Hamming Distance Calculator

Enter two strings or binary sequences of equal length to instantly calculate their Hamming distance — the number of positions where the symbols differ.

0 chars
0 chars
Examples

Enter two sequences on the left to see the Hamming distance.

Summary

Enter two strings or binary sequences of equal length to instantly calculate their Hamming distance — the number of positions where the symbols differ.

How it works

  1. Select the input mode: Text, Binary, or Hexadecimal.
  2. Enter the first string or sequence in the top input field.
  3. Enter the second string or sequence of the same length in the bottom field.
  4. The Hamming distance is calculated instantly as you type.
  5. A visual diff highlights every position where the two inputs differ.
  6. Use the swap button to reverse the order of the two inputs.

Use cases

  • Detect bit errors in digital communications and storage.
  • Compare DNA or protein sequences in bioinformatics.
  • Measure similarity between binary feature vectors in machine learning.
  • Verify checksums and error-correcting codes during development.
  • Analyze password or hash differences during security research.
  • Teach and demonstrate coding-theory concepts interactively.
  • Compare short strings for fuzzy-match debugging.
  • Validate data integrity after transmission or encoding.

Frequently Asked Questions

Last updated: 2026-06-13 · Reviewed by Nham Vu