How to use the Internet checksum Calculator tool
- Set Input format to Hexadecimal bytes for packet data, or to UTF-8 text to checksum the bytes of a string.
- Paste the data into the Input box. To compute a header checksum, write 00 00 in the checksum field first, as the sender does.
- Select Calculate. The Example button runs the text 123456789, which gives 0xF62A.
- Read the four hex digits of the checksum in the Result box.
- Select Copy to copy the checksum.
How the Internet checksum is calculated
RFC 1071 describes the algorithm. Split the data into 16-bit words, most significant byte first. If the length is odd, pad the last byte with a zero byte on the right. Add all the words with one's complement addition: whenever a sum overflows 16 bits, the carry is added back into the low end. Finally invert every bit of the total.
The end-around carry is what separates this from a plain 16-bit sum. It also gives the receiver a simple test: a block that already contains its correct checksum sums to 0xFFFF, so the inverted result is zero.
Worked example: an IPv4 header checksum
Here is a 20-byte IPv4 header for an ICMP packet from 192.0.2.1 to 198.51.100.7, with the checksum field (bytes 11 and 12) set to zero. In Hexadecimal bytes mode the tool returns 0x3227.
Write 32 27 into the checksum field and run the header again. The result is now 0x0000, which is how a router validates the header. Change one byte, for example the last one from 07 to 08, and the result becomes 0xFFFE instead of zero.
4500 0054 1c46 4000 4001 0000 c000 0201 c633 6407 -> 0x3227
4500 0054 1c46 4000 4001 3227 c000 0201 c633 6407 -> 0x0000Input formats and how bytes are read
Pick the format that matches your source: hex for a packet capture, text for a test string. The bytes are processed in the page, so captures from a private network are not sent anywhere.
- Hexadecimal bytes: pairs of hex digits in upper or lower case. Spaces, commas and line breaks between them are removed.
- One 0x prefix at the very start is allowed. A prefix on every byte, colons, or an odd number of digits gives Use complete hexadecimal bytes.
- UTF-8 text: the string is encoded as UTF-8 and every byte counts, including spaces and line breaks. Nothing is trimmed.
- Odd lengths are fine. The text abc is summed as the words 0x6162 and 0x6300 and returns 0x3B9D.
- Empty input returns 0xFFFF, the inverse of a zero sum.
Using it for UDP, TCP and ICMP
The tool checksums exactly the bytes you give it. For an IPv4 header that is the header alone. For ICMP it is the whole ICMP message. UDP and TCP also cover a pseudo-header that is not transmitted: source address, destination address, a zero byte, the protocol number and the segment length. To reproduce those checksums, type the pseudo-header bytes in front of the segment yourself.
UDP over IPv4 has one more rule from RFC 768. A computed checksum of 0x0000 is sent as 0xFFFF, because zero in the field means the sender did not compute one.
Frequently asked questions
How do I verify an IP header checksum?
Paste the complete header in hex, including the received checksum bytes, and select Calculate. A result of 0x0000 means the header is consistent. Any other value means at least one bit changed in transit or the bytes were copied incorrectly.
Is the Internet checksum a CRC?
No. A CRC is the remainder of a polynomial division and catches burst errors well. The Internet checksum is a one's complement sum, cheap enough to update incrementally in routers, but it cannot see two 16-bit words swapping places or errors that cancel out.
In which byte order is the result printed?
The tool reads words big-endian, which is network byte order, and prints the checksum the same way. For 0x3227, write the byte 32 and then the byte 27 into the packet.
Can I use it for IPv6?
IPv6 has no header checksum, but TCP, UDP and ICMPv6 over IPv6 use the same arithmetic with a longer pseudo-header: two 128-bit addresses, a 32-bit upper-layer length, three zero bytes and the next-header value. Enter those bytes ahead of the payload.