Encode, decode and error-correct Hamming (SEC / SECDED) codes — syndrome, parity coverage, one-click copy — browser-only
- Runs locally
- Category Developer & DevOps
- Best for Formatting, validating, shrinking, or inspecting code-adjacent text.
Result
Hamming code lets a receiver fix one flipped bit on its own. Everything runs in your browser.
What this tool does
Free Hamming code calculator that encodes binary data into a single-error-correcting Hamming code, then decodes a received codeword to locate and fix one flipped bit. Type any length of data bits; the tool inserts parity bits at the power-of-two positions (1, 2, 4, 8…), computes each one as even parity over the positions it covers, and shows the full codeword with a labeled bit layout. Switch to decode mode, paste a received code, and it computes the syndrome, points to the exact bit in error, flips it back, and extracts the original data. Turn on SECDED to add an overall parity bit so a double-bit error is detected instead of silently miscorrected. The classic (7,4) code, the (15,11) code and any width in between all work. Every parity position and its coverage list are spelled out so you can follow the math by hand. Runs entirely in your browser; share a link that reopens the exact bits. 100% client-side.
Tool details
- Input
- Form fields
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 10 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Developer & DevOps · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Hamming Code Calculator fits into your work
Use it in the small gaps between coding, reviewing, debugging, and shipping.
Developer jobs
- Formatting, validating, shrinking, or inspecting code-adjacent text.
- Preparing snippets for documentation, tickets, commits, or handoff.
- Checking a small payload quickly without switching tools.
Developer checks
- Run irreversible transforms like minify or obfuscate on a copy.
- Keep secrets out of pasted snippets unless the tool explicitly stays local.
- Use your normal tests or linter before shipping transformed code.
Good next steps
These links move the current task into a more complete workflow.
- 1 Unit Converter Convert between length, weight, temperature, area, volume, speed, time — instant, browser-only Open
- 2 Number Base Converter Number base converter — binary, octal, decimal, hex, and any base 2-36. Bitwise too. Open
- 3 Bitwise Calculator AND, OR, XOR, NOT and bit shifts on integers, with decimal, hex and binary side by side, all in your browser Open
Real-world use cases
Check your computer-networks homework
A course problem hands you 4 data bits and asks for the (7,4) Hamming codeword, or gives you a received code and asks where the error is. Type the bits, read the codeword or the syndrome, and the coverage panel shows exactly which parity bit checks which positions so you can reproduce the steps in your write-up instead of copying a number you cannot defend.
Build and verify an FEC encoder in firmware
You are writing a Hamming encoder for a low-bandwidth radio link and need a reference oracle. Encode the same test vectors here, compare bit for bit, then flip a bit in your captured frames and confirm your decoder lands on the same error position this tool reports. It turns an off-by-one parity placement bug from a guessing game into a diff.
Explain ECC memory to a teammate
Someone asks why server RAM can shrug off a cosmic-ray bit flip. Turn on SECDED, flip one bit to show it gets corrected, then flip two to show the double-error is detected and refused rather than miscorrected. The live status line makes the single-correct / double-detect promise concrete instead of a slide bullet.
Prep a lecture or tutorial on error-correcting codes
Building slides on Hamming codes? Generate clean worked examples with the bit layout and per-parity coverage already laid out, screenshot them, and hand students a shareable link with the exact bits so they can poke at encode and decode themselves between classes.
Common pitfalls
Counting bit positions from 0 or from the right. This tool numbers positions from 1 starting at the leftmost bit, which is the convention that puts parity at 1, 2, 4. If you index the other way the syndrome will point at the mirror position and look wrong.
Expecting a plain Hamming code to fix two errors. A single (7,4) or (15,11) code corrects exactly one flipped bit. Two flips in one word will be miscorrected into a third wrong bit. Turn on SECDED so a double error is at least detected.
Feeding the data bits and parity bits as one blob into encode mode. Encode takes only the raw data bits and computes the parity for you. If you paste a full codeword into the data field you double-encode it. Use decode mode for codewords that already carry parity.
Privacy
The whole pipeline — parity placement, the syndrome computation, the bit-flip correction and the data extraction — is plain JavaScript running in your browser tab. No bits you type are uploaded or logged anywhere. The one thing to know: the shareable link encodes your data or codeword in the query string, so a link pasted into chat records those bits in the recipient server's access log. For anything sensitive, use the copy button and paste the text rather than the URL.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only