Hamming Distance Calculator

Compare two equal-length strings or bit strings and count positions that differ.

Need help with the calculation?
Distance -
Length -
Status -
Ask AI about this article

Enter the example value or paste your own input, choose the mode when one is available, and read the first result card for the direct answer. The output area gives a copyable block for code reviews, documentation, API tests, classwork or troubleshooting notes.

What the result means

Hamming distance is useful for fixed-length codes, bit strings and simple error-detection examples.

What is not included

Inputs must have the same length. Use Levenshtein distance when insertions or deletions are allowed.

Privacy note

The calculation runs in your browser. Avoid pasting production secrets, credentials, private keys, customer data or regulated personal data unless your own policy allows browser-based tools.