Hamming Code Error-Correction Calculator
Encode data bits into Hamming(7,4), Hamming(15,11), or Hamming(31,26) codes with parity at powers of two, decode received codewords via the syndrome, correct any single-bit error, and detect double-bit errors with SECDED extended Hamming. Interactive bit-flip error injection, per-parity-bit coverage display, even/odd parity mode, copy codeword, history (localStorage), and shareable URL. 100% client-side.
About Hamming Code Error-Correction Calculator
Encode data bits into Hamming(7,4), Hamming(15,11), or Hamming(31,26) codes with parity at powers of two, decode received codewords via the syndrome, correct any single-bit error, and detect double-bit errors with SECDED extended Hamming. Interactive bit-flip error injection, per-parity-bit coverage display, even/odd parity mode, copy codeword, history (localStorage), and shareable URL. 100% client-side. Everything runs locally in your browser — your data never leaves your device.
How to use
- Enter your input in the tool above.
- Adjust any options to your preference.
- Use the Copy or Download buttons to save the result.
- Everything happens locally — your data never leaves your browser.
FAQ
What is a Hamming code and how does it correct errors?
A Hamming code is a linear error-correcting code that places parity bits at positions 1, 2, 4, 8, 16, … (powers of two) of a codeword. Each parity bit covers all positions whose binary address has the corresponding bit set. When a codeword is received, the decoder XORs those covered bits to compute a syndrome: syndrome = 0 means no error, syndrome = p means position p was flipped and can be corrected by flipping it back. Standard Hamming corrects any single-bit error per codeword.
What is SECDED and how does it differ from plain Hamming?
SECDED (Single-Error Correction, Double-Error Detection) adds one extra overall parity bit covering the entire codeword. With it, the decoder can still correct any single-bit error AND detect (but not correct) any two-bit error. The rule: syndrome = 0 with overall parity OK = no error; syndrome ≠ 0 with overall parity mismatch = correctable single error at the syndrome position; syndrome ≠ 0 with overall parity OK = uncorrectable double-bit error; syndrome = 0 with overall parity mismatch = error in the overall parity bit itself.
Which Hamming code variants are supported?
Three standard variants: Hamming(7,4) with 4 data bits and 3 parity bits, Hamming(15,11) with 11 data bits and 4 parity bits, and Hamming(31,26) with 26 data bits and 5 parity bits. You can also let the tool auto-pick the smallest variant that fits your data length, or use the arbitrary-length encoder that computes p = ⌈log2(k + p + 1)⌉ for any k.
Can I inject an error and watch the decoder correct it?
Yes. After encoding, click any bit (parity or data) to flip it and inject a single-bit error — the decoder recomputes the syndrome live, highlights the flipped position, corrects it, and shows the recovered data. For double-bit-error testing with SECDED enabled, flip two positions and the tool flags the uncorrectable double error instead of miscorrecting.
What extra features does this tool have versus other Hamming calculators?
(1) Three standard variants plus arbitrary-length encoding. (2) Even/odd parity mode toggle. (3) Per-parity-bit coverage display (which positions each parity bit covers and the values it sees). (4) Live syndrome computation with binary display. (5) Interactive single- and multi-bit error injection. (6) SECDED extended Hamming with double-error detection. (7) Step-by-step corrected codeword and recovered data. (8) Copy codeword / recovered data. (9) History (localStorage, last 20). (10) Shareable URL with full state encoded. (11) Color-coded parity vs data bits. (12) Auto-variant picker. 100% client-side — no uploads, no ads.
Related tools
.bashrc / .zshrc Alias & Config Manager
Build shell aliases, functions, exports, and PATH edits in a visual editor, then export a clean, commented .aliases file sourced from both .bashrc and .zshrc — with shadowing detection against shell builtins and common CLI tools, function suggestions when args are needed, starter packs (git, docker, kubectl, navigation, safety, ls, dev, devops, data science), import of existing rc files, dedupe, history (localStorage), and shareable URL. 100% client-side.
Add / Subtract Date Calculator
Add or subtract years, months, weeks, days, hours, minutes and seconds from a starting date/time. Calendar-day or business-day mode with custom weekend + holiday list. Month-end policy toggle (clamp to last day vs overflow). Repeat/series mode (e.g. every 2 weeks x 10) with CSV export. Shareable URL. 100% client-side.
Age Calculator
Calculate exact age from a birth date in calendar years/months/days (no negative-day bugs) plus totals in months/weeks/days/hours/minutes/seconds. Next-birthday countdown with weekday. Feb-29 birthday policy toggle. Milestones (1,000 days, 10,000 days, 1 billion seconds). Zodiac sign + Chinese zodiac. Age gap comparison. Shareable URL. 100% client-side.