1. Home
  2. Developer tools
  3. Packet Header Decoder

Packet Header Decoder

Copy the bytes of a packet from Wireshark or tcpdump and see what they mean: addresses, TTL, ports, sequence numbers, flags, window and checksums.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Packet Header Decoder

  1. Choose whether the bytes start with an IP header or an Ethernet frame.
  2. Paste the hex.
  3. Read each layer.

Features

  • Ethernet with VLAN tags, IPv4, IPv6, TCP, UDP, ICMP and ICMPv6
  • IPv4 header checksum always verified
  • TCP and UDP checksums verified when complete
  • TCP options and flags explained
  • Accepts hex dumps with offsets
  • Shows the payload bytes

Supported formats

Input

  • Hex bytes of an IP packet

You get

  • IPv4 fields
  • TCP, UDP or ICMP fields
  • Checksum check

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Packet Header Decoder is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • It decodes IPv4 with TCP, UDP or ICMP; IPv6 and other protocols are not decoded.
  • Fragmented packets are decoded from the first fragment only, and options are listed but not interpreted.

Guide

Reading an IP packet from its hex bytes

A packet capture shows rows in a list, but sometimes all you have is a block of hexadecimal copied from a log, a book or a colleague. Decoding the bytes by hand means counting offsets and remembering which field is where. This page names every field of the headers it understands and checks the checksums, entirely in your browser.

What it understands

Choose “An IPv4 or IPv6 header” to start at the IP layer, or “An Ethernet frame” to start with the link-layer header. The decoder reads the IP header, then the transport header it announces: TCP, UDP or ICMP. For IPv4 it shows version and header length, DSCP and ECN, total length, identification, flags, fragment offset, TTL, protocol, header checksum and the two addresses. For TCP it adds ports, sequence and acknowledgement numbers, window, flags and options; for UDP the ports, length and checksum. The remaining bytes are shown as the payload.

Input formats

Paste the bytes as hex with or without spaces. A dump with offsets, as printed by tcpdump -x, and the hex copied from Wireshark’s “Copy as Hex Stream” both work. Offset columns in a dump are tolerated, as the input box says. Everything is decoded locally, so a packet containing real addresses or payload never leaves your device.

Checksums and their traps

The IPv4 header checksum is always recomputed, and the page prints “correct” or “wrong” next to the stored value. TCP and UDP checksums cover the data and a pseudo-header, so they can be checked only if the whole packet is present. A frequent source of false alarms is checksum offload: the operating system hands the network card an incomplete checksum and the card fills it in later, so a capture taken on the sending host shows wrong values for packets that left the machine fine.

A worked example

The sample is a DNS query sent from 192.168.1.10 to 8.8.8.8. The IPv4 header is 20 bytes with version 4, a total length of 57 bytes, identification 0x1a2b, the Don’t Fragment flag, a TTL of 64 and protocol 17 (UDP). Its checksum 0x4ec7 is reported correct. The UDP header goes from source port 50010 to destination port 53, with length 37 bytes and checksum 0x88b0, also correct. The 29-byte payload begins 12 34 01 00 00 01 (a DNS transaction ID, flags and one question) and spells out the name example.com in DNS label form.

Limits

The decoder handles IPv4, IPv6, TCP, UDP and ICMP only. IPv6 extension headers and other protocols are displayed as payload bytes. Fragmented packets are not reassembled, and options are listed but not all interpreted in depth. The tool is not a capture application: it cannot open pcap files or follow streams. Use IPv4 Checksum Calculator to see the checksum arithmetic in detail.

Offsets worth remembering

Bytes are counted from zero at the start of the IP header. In IPv4, byte 0 holds the version and header length, bytes 2 and 3 the total length, byte 8 the TTL, byte 9 the protocol number, bytes 10 and 11 the header checksum, bytes 12 to 15 the source address and bytes 16 to 19 the destination. In the transport header that follows, the first four bytes of both TCP and UDP are the source and destination ports. Knowing these positions lets you read a hex dump by eye when no analyser is available.

Checked against the current version of the Packet Header Decoder on .

Frequently asked questions

Why does my own capture show a wrong checksum?

Network cards often compute checksums in hardware after the capture point. Packets captured on the sending machine can therefore carry placeholder checksums that look wrong although the packet on the wire is fine.

What does the Don't Fragment flag do?

It tells routers not to split the packet. If the packet is larger than a link's MTU the router must drop it and send an ICMP error, which is how path MTU discovery learns the limit.

Why does my capture show a wrong checksum?

Captures made on the sending machine often show invalid checksums because the network card fills them in after the capture point (checksum offload).

How do I copy packet bytes from Wireshark?

Right-click the packet or a layer, choose Copy, then “…as a Hex Stream” or “as Hex Dump”.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.