Category 10 — String Search & Similarity
Count the number of positions where two equal-length strings differ — character or bit level.
Character Mode compares text position by position, while Hex / Bit Mode compares hex values down to the individual bits.String A and String B — or two hex strings into Hex String A and Hex String B. Results update live as you type.karolin / kathrin or deadbeef / deadc0de to see it in action instantly.See exactly how many characters separate two strings — useful when diffing identifiers, filenames, or user-entered values that should be identical.
Hamming distance is the foundation of Hamming codes used in RAM, RAID, and QR codes. This tool shows the distance a code relies on.
Hex / Bit Mode reveals the exact bits where two hex values diverge — handy when comparing hashes, keys, or packet payloads.
Match percentage and the matches/differ split turn raw distance into an intuitive similarity measure for quick comparison.
A code's minimum Hamming distance determines how many bit errors it can detect or correct — experiment with values to see why.
Everything runs in your browser. Nothing is uploaded, logged, or sent to a server — safe for sensitive strings and keys.
Hamming distance is the number of positions at which two strings of equal length differ. For example, karolin and kathrin have a distance of 3.
Hamming distance is only defined for strings of equal length. If the lengths differ, the tool shows a "Length mismatch" error rather than computing a misleading value.
Character Mode compares two strings one character at a time. Hex / Bit Mode parses two hex strings into bytes and reports both the byte-level distance and the number of differing bits.
It's (length − distance) / length × 100 — the share of positions that are identical. A distance of 0 means a 100% match.
In coding theory, the minimum Hamming distance between valid codewords sets the limits: a distance of d detects up to d−1 errors and corrects up to ⌊(d−1)/2⌋ errors.
Not with Hamming distance — pad the shorter string first, or use an edit-distance metric like Levenshtein, which handles insertions and deletions.
Never. All comparison happens locally in JavaScript. Your input is not sent to, stored on, or logged by any server.