UnQTools
Developer Runs in your browser

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.

100% Private Works Offline Instant

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

  1. Enter your input in the tool above.
  2. Adjust any options to your preference.
  3. Use the Copy or Download buttons to save the result.
  4. 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.

Search tools and actions

Search across all 616 tools, categories, and quick actions.