Skip to main content

Hash Compare

Paste two hashes: the tool normalises them (case, spaces, colons, prefixes like sha256-), tells you whether they match, the probable algorithm and the position of the first difference.

  • Clipboard

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Case, spaces, colons and prefixes such as “sha256-” are ignored.

Was this tool useful?

How does this tool work?

This tool checks whether two hashes are identical without you having to read them character by character. Use it to compare the checksum a vendor publishes with the one you computed, or two certificate fingerprints shown in different formats.

Before comparing, both values are normalised: converted to lowercase, stripped of spaces, line breaks and colons, and cleared of a leading algorithm prefix such as "sha256-" or "sha256=". As a result, "AB:CD:EF" and "abcdef" are treated as equal, and so are "sha256=2cf24d…" (GitHub's format) and "2cf24d…". The length of the normalised value is then used to estimate the algorithm: 32 hex characters for MD5, 40 for SHA-1, 64 for SHA-256, 96 for SHA-384 and 128 for SHA-512. This detection is only a probability, since SHA3-256 or BLAKE2s also produce 64 characters.

The comparison runs in constant time: the tool goes through every character instead of stopping at the first mismatch, a standard precaution so that timing does not reveal where two secrets differ. When the values do not match, the position of the first differing character is shown, which helps spot a truncated copy or a selection mistake. Different lengths often indicate two different algorithms, for example a SHA-1 compared with a SHA-256. A match only proves that your file is identical to the one used to produce the reference: trust depends on where that reference came from, ideally an official HTTPS page or a signed file.

How to use this tool

  1. Paste the reference value

    Enter the official or expected hash in the first field, with or without separators or prefix.

  2. Paste the value to check

    Add the hash you computed or received in the second field.

  3. Read the result

    The tool shows whether the two values match, the probable algorithm based on length and, if they differ, the position of the first difference.

Use cases

Check a download against the official checksum

Paste the value from the download page (Ubuntu, VeraCrypt, Python…) and the one from sha256sum or Get-FileHash. PowerShell prints the hash in uppercase and the page shows lowercase: the tool compares case-insensitively.

Compare certificate fingerprints

Browsers and OpenSSL often show a certificate's SHA-256 fingerprint as "AB:CD:…". Compare it with a value without separators from a configuration file or a colleague to confirm it is the same certificate.

Check a webhook signature by hand

While debugging, compare GitHub's X-Hub-Signature-256 header, prefixed with "sha256=", with the HMAC you recomputed: the prefix is ignored automatically.

Examples

Matching hexadecimal fingerprints

Input

Reference hash: AB:CD:EF; Hash to check: abcdef

Result

The hashes match: once case and colons are ignored, both values read abcdef.

Tips and best practices

  • Compare two values in the same encoding: a SHA-256 in hex (64 characters) and the same hash in Base64 (44 characters) will never match. The hash generator shows both forms.
  • If the lengths point to two different algorithms, recompute the hash with the algorithm the vendor specifies before concluding the file is corrupted.
  • Take the reference value from a source separate from the file, such as the official HTTPS page: an attacker who replaced the file on a mirror may have replaced the checksum published alongside it.

Sources and references

Frequently asked questions

How do I verify the checksum of a downloaded file?

Compute the file's hash with the algorithm the vendor specifies, for example with sha256sum on Linux, shasum -a 256 on macOS, Get-FileHash on Windows or the hash generator. Then paste that value and the official value into the two fields. If they match, your file is identical to the published one.

Are hashes case-sensitive?

Not hex hashes: "A1B2" and "a1b2" represent the same bytes, which is why PowerShell (uppercase) and sha256sum (lowercase) give equivalent results. In Base64, however, uppercase and lowercase letters encode different values. It is best to compare the hex form.

How can I tell which algorithm produced a hash?

Length is the best clue: 32 hex characters for MD5, 40 for SHA-1, 64 for SHA-256, 96 for SHA-384 and 128 for SHA-512. It is not certain, because other algorithms produce the same lengths (SHA3-256 also gives 64 characters). The file name (SHA256SUMS) or the vendor's documentation settles it.

What does it mean if a hash does not match?

Your file differs from the one used to compute the reference: an interrupted download, a corrupted file, the wrong version or a malicious change. First check that you are comparing the right file with the same algorithm, then download it again from the official source. Do not run a file whose hash does not match.

Why compare in constant time?

A naive comparison stops at the first differing character, so response time can reveal how many characters are correct. That is a real server-side risk for HMAC signatures or tokens, which is why crypto.timingSafeEqual or hmac.compare_digest exist. The tool follows the same good practice, even though the risk is negligible in your own browser.

Does a match guarantee that the file is safe?

No, it proves that your file is identical to the reference file, not that the reference is clean. If the website and its checksum were compromised together, both values will still match. A GPG or Sigstore signature verified with the vendor's key provides that extra guarantee.

Related tools

Tools similar or complementary to this one.

Similar tools

Compute MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of a text or file in one go.

Security & privacyFeaturedUse this tool

Compute an HMAC-SHA-1, SHA-256, SHA-384 or SHA-512 in hex or Base64 and verify a webhook signature.

Security & privacyUse this tool

Decode a PEM X.509 certificate or CSR: subject, issuer, dates, SANs, public key and SHA-256 fingerprint.

Security & privacyUse this tool