LocalExcelTool
Get started

How to check a SHA-256 checksum (and why a mismatch usually is not an attack)

Every download page ends with a 64-character string that nobody checks, and every time someone does check it, the first result is a mismatch caused by a line break. Here is how to compare them properly.

Last verified 2026-11-24

The short answer

A checksum proves one thing only: the bytes you have are the bytes the publisher hashed. Compare the whole 64-character string, not the first eight characters, and remember that a single trailing newline changes the result — for text use the browser tool, for a multi-gigabyte file use the command your OS already ships (certutil, shasum -a 256, sha256sum).

What a checksum can and cannot tell you

SHA-256 turns any input into 256 bits, written as 64 hexadecimal characters. Feed it the same bytes twice and you get the same output; change one bit anywhere and roughly half the output bits change. That gives you exactly one guarantee: if your hash matches the publisher's hash, the file is bit-for-bit what they hashed.

It does not tell you the file is safe. If an attacker controls both the download and the hash list on the same page, both can be replaced together. A checksum protects against a corrupted download, a truncated transfer, a proxy that rewrote the file — the boring failures that happen far more often than tampering.

Why a correct file still shows a mismatch

Hashes are whitespace-sensitive, and that is the single most common false alarm. Measured with the same SHA-256 implementation browsers use:

InputSHA-256
(empty string)e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
hello2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
hello + newline5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03
Computed 2026-11-24 with Node's crypto module, the same NIST-validated algorithm Web Crypto exposes.
  • A trailing newline changes the hash completely. If you copied a line out of a page, you copied the newline too. Hash the file, never a copy-pasted string.
  • Windows line endings. If the publisher hashed a text file on Linux and you saved it on Windows, every line ending became two bytes instead of one.
  • Case does not matter on the hex string (AB and ab are the same value), but the dash formatting some tools insert does.
  • A truncated download is the real-world case: the byte count in your file does not match the published size, so the hash cannot match either.

The command that ships with your OS

SystemCommand
Windows (cmd)certutil -hashfile <file> SHA256
Windows (PowerShell)Get-FileHash <file> -Algorithm SHA256
macOSshasum -a 256 <file>
Linuxsha256sum <file>
All four print lowercase hex. Compare with what the publisher lists, ignoring spacing.

On macOS, dragging the file into the terminal window writes its path for you, which removes the usual quoting mistakes with spaces in folder names. On Windows, quote the path if it contains spaces: certutil -hashfile "C:\Users\me\Downloads\installer.exe" SHA256.

The same primitive, used for webhook signatures

Most API integrations do not hash a file, they verify an HMAC: the provider sends a payload plus a signature computed with a shared secret, and you recompute it to prove the request came from them. Same family of algorithm, one extra input — the key. Per RFC 2104 the rule is simply to write the hash after HMAC-, so HMAC-SHA256 is what you will see in most webhook docs, alongside the header carrying the hex digest.

  1. Open the Hash Suite and paste the raw request body exactly as received. Do not parse it first and re-serialise it — JSON key order and spacing are part of the bytes.
  2. Put the shared secret in the secret field. The tool then also prints HMAC-SHA256 and HMAC-SHA512 next to the plain digests.
  3. Compare the provider's signature header with the computed HMAC string. If they differ, the body was altered in transit or the secret is wrong.

What a browser tool cannot do

Hashing text in a page is fast, but reading a 4 GB installer into browser memory is not, so this tool hashes text you paste rather than files you pick. For a downloaded file use the command table above — those stream the file and have no size limit worth worrying about. The browser tab also cannot compute MD5, because Web Crypto deliberately omits it; MD5 is broken for anything security-related, so treat its absence as a feature.

Frequently asked questions

The hashes match but the file will not run. What now?

Then the bytes are intact and the problem is the environment, not the download: an unsigned binary blocked by Windows SmartScreen or macOS Gatekeeper, a missing runtime, or the wrong architecture. A checksum matching is also the proof that the publisher's own instructions are the place to look next.

Should I trust MD5 or SHA-1 sums?

For integrity against accidents, they still work. For anything where someone might deliberately craft a collision, no: practical MD5 collisions have existed since 2004 and SHA-1 collisions were demonstrated in 2017. If a download page offers only an MD5, prefer the HTTPS connection over the hash.

Why is the hash I get different from the one in the release notes?

Check the byte count first — a truncated download is the most common cause. Then confirm you hashed the file and not a copy that went through a text editor or an email client, both of which can rewrite line endings.

Is my input sent anywhere when I use the browser tool?

No. Web Crypto runs locally, so the text and the secret stay in the tab. That is also why it is safe to paste a webhook secret here — but still rotate the secret if you have any doubt about the machine you are on.