Compare two hashes — check a checksum matches, ignoring case and spaces

Paste the checksum a publisher gave you and the one you computed; the tool cleans up case, spacing and labels, then says Match or No match and how many characters differ.

Live demo · real result from this tool
ResultMatch
Expected length
64 characters
Actual length
64 characters
Differing characters
0
Likely algorithm (by length)
SHA-256

Case, spaces and colons are ignored for hex digests. The comparison checks every character rather than stopping at the first difference.

Processed on your device — nothing is uploaded.

How to use the hash comparator

  1. Paste the published or trusted value into Expected hash.
  2. Paste the value you calculated into Actual hash.
  3. Read Result: Match or No match. The panel also shows both lengths, the number of Differing characters, and the Likely algorithm (by length).
  4. If they do not match, check the lengths first, then the algorithm, then the data.

What it does and when to use it

Eyeballing two 64-character strings is error-prone, and checksums are often printed in different styles: uppercase with spaces in one place, lowercase in another, or with colons between byte pairs. This tool removes those differences so you only see real ones.

Typical uses are confirming that an ISO image or installer matches the SHA-256 on the vendor’s download page, checking a Subresource Integrity value, or comparing a hash from a log with one in a database. If you have the file but not its hash yet, compute it first with the file hash calculator, which also has its own expected-checksum box. For text, use the SHA-256 generator. If you are unsure what kind of hash you are holding, the hash identifier lists the candidates.

How it works

Each value is trimmed. A short label followed by : or = is dropped when 8 or more hex digits come after it, grouped or not. All spaces and colons are then removed. If what remains is pure hex, it is lower-cased, unless it was a single run without spaces or colons that mixes upper and lower case; that is treated as Base64 and kept as it is.

The two cleaned strings are compared position by position over the full length of the longer one. Every position where the characters differ adds one to Differing characters. A difference in length also makes the result No match. The likely algorithm is the first candidate for that hex length, the same guess the identifier makes, so a 64-digit value is shown as SHA-256 even though SHA3-256 and BLAKE3 have the same length.

Worked examples

Same SHA-256, different style. The default values are the SHA-256 of empty input, one lowercase and one in uppercase groups of eight. Result: Match, 64 characters each, likely SHA-256.

One digit off. 900150983cd24fb0d6963f7d28e17f72 against …7f73 gives No match with Differing characters: 1, likely MD5. A single change in the data would normally alter about half of the digits, so one differing digit points to a copying mistake rather than a different file.

Label pasted by accident. SHA256: e3b0c442…7852b855 against the bare value is a Match; the label is stripped.

Limits and tips

  • The tool compares strings. It does not hash anything, so both values must come from the same algorithm.
  • A match proves the data is unchanged only if the expected value came from a source you trust, ideally over HTTPS or with a signature.
  • Base64 hashes are compared exactly after spaces and colons are removed.
  • Nothing you paste leaves the browser.

Frequently asked questions

Does upper or lower case matter?
Not for hex digests. A value made only of 0–9 and a–f is lower-cased before comparing, as long as it is in one case or grouped with spaces or colons. Base64 values, including an ungrouped value that mixes upper and lower case, keep their case, because in Base64 "a" and "A" are different data.
Can I paste the whole line from a checksum file?
A leading label such as "SHA256:" or "md5=" is removed when a hex value of 8 or more digits follows it, even if the digits are grouped with spaces or colons. A file name after the hash is not removed, so delete it first.
The hashes differ in many places. What happened?
Either the file really is different, or you are comparing two different algorithms. Check the two length lines; an MD5 is 32 characters and a SHA-256 is 64. If a character is missing near the start, every later position shifts and counts as different.
Why does it say the comparison checks every character?
The code walks the full length even after it finds a difference, instead of stopping early. In server code this style avoids leaking timing clues about where two secrets differ. In a browser tool it simply means the difference count is complete.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close