Internet Checksum Calculator
Enter hexadecimal data to compute its RFC 1071 Internet checksum.
Result
How it is calculated
Paste your data as hexadecimal digits; spaces and upper or lower case are ignored, but anything that is not 0-9 or a-f (including a 0x prefix) makes the tool return nothing. The digits are cut into 16-bit words of four hex digits. They are added together, and every carry out of bit 16 is folded back into the low 16 bits: sum = (sum & 0xFFFF) + (sum >> 16), repeated until nothing is left over. The checksum is the bitwise complement of that sum, ~sum & 0xFFFF, printed as four hex digits with a 0x prefix. If the data ends in an incomplete word it is padded with zeros on the right, so the single byte ab is treated as ab00. To generate a header checksum, set the checksum field to 0000 first.
Worked example
An IPv4 header with its checksum field set to 0000: 4500 0073 0000 4000 4011 0000 c0a8 0001 c0a8 00c7. Adding the ten words gives 0x2479C; the carry above 16 bits (0x2) is folded back into the low part: 0x479C + 0x2 = 0x479E. The one's complement of 0x479E is 0xB861, so the checksum is 0xB861. Put B861 into the checksum field and recompute: the result is 0x0000, which is how a receiver verifies a good header.
Common mistakes
- Forgetting to zero the checksum field before generating. With the old value left in, the sum is wrong and you get a different number (a header that already contains a valid checksum yields 0x0000).
- Including a
0xprefix or separators like colons or commas. Only hex digits and whitespace are accepted. - Entering decimal or ASCII text. The tool reads every character as a hex digit, so "1500" means bytes 15 00, not the number fifteen hundred.
- Dropping a leading zero in a byte. "4 5 00" collapses to 4500 after whitespace is removed, but "500" is padded on the right to 5000, a different value.
- Expecting a hash. The Internet checksum only catches accidental corruption; it is trivially forged and is not a security check.
About this calculator
This calculator computes the Internet checksum defined in RFC 1071: split the data into 16-bit words, sum them using one's-complement arithmetic (any carry out of the top bit wraps back into the sum), then take the one's complement of the final result. It's a lightweight error-detection code, not a cryptographic hash.
This exact algorithm is what protects the header of every IPv4, TCP and UDP packet on the internet — the receiving side recomputes the checksum and drops the packet if it doesn't match, catching transmission errors introduced anywhere along the path.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments