ICMP Message Decoder

Paste the hex bytes of an ICMP message and read the type and code with the IANA name, a verified checksum, the rest-of-header field for echo, redirect, parameter problem, timestamp and router discovery, and the original IPv4 datagram that an error message quotes.

Eight bytes or more. Spaces, colons, commas, 0x prefixes and dump offset labels are ignored, so a capture line, a tcpdump -x line or a hex dump pastes straight in. A complete IPv4 packet whose protocol field is 1 is unwrapped before decoding.

The decoded message
The original datagram quoted inside the error message
Routers advertised by this message
Router addressPreference level

Fields are read at the offsets RFC 792 gives them: type, code, a 16-bit checksum, then four bytes whose meaning depends on the type. The checksum is the 16-bit one's complement of the one's complement sum of the message starting at the type, with the checksum field zeroed and a final odd octet padded with a zero, so a message carrying the right value sums to 0xFFFF. The rest-of-header field is decoded where a standard defines it: echo and information messages carry an identifier and sequence number, a fragmentation-needed message carries the next-hop MTU (RFC 1191), redirect carries a gateway address, parameter problem carries a byte pointer, timestamp carries three millisecond counters, address mask carries a mask, and router advertisement carries a count, entry size, lifetime and a list of addresses with signed preference levels (RFC 1256). Destination unreachable, source quench, redirect, time exceeded and parameter problem quote the original datagram's IPv4 header and the first 64 bits of its data (RFC 792), so that inner header is parsed and the quoted length is compared with the original total length. Type and code names come from the IANA ICMP parameters registry; a name marked Deprecated is the registry's own wording. ICMPv6 is a different protocol with its own registry and a pseudo-header checksum, so an IPv6 packet is refused rather than decoded. Everything runs in your browser; nothing is sent anywhere.