How to Verify a File Checksum (SHA-256, MD5) on Any System

Publishers print a checksum next to every download for a reason. Here is how to check it in ten seconds on any system, and what to do when it does not match.

Why publishers print checksums

A download can be corrupted in transit, served from a compromised mirror, or swapped by malware on your own machine. The publisher hashes the file they built and prints the result. If the hash of the file you have matches, you have their file, byte for byte. If it does not, something changed, and you should find out what before running it.

Most projects publish SHA-256. Some older ones still publish MD5 or SHA-1, which detect accidental corruption but not deliberate tampering; see MD5 vs SHA-256 for why.

In your browser, without uploading

Open the file checksum calculator, drop the file, and paste the publisher’s checksum into the compare box. The file is read locally in 4 MB slices and hashed in WebAssembly; nothing is uploaded, and multi-gigabyte images work. A green “verified” means the bytes match.

On the command line

Windows

certutil -hashfile "C:\Downloads\installer.exe" SHA256

or in PowerShell:

Get-FileHash "C:\Downloads\installer.exe" -Algorithm SHA256

macOS

shasum -a 256 ~/Downloads/installer.dmg

Linux

sha256sum ~/Downloads/image.iso

If the publisher provides a SHA256SUMS file, you can verify a whole directory at once:

sha256sum -c SHA256SUMS

For MD5 replace with certutil ... MD5, md5 (macOS) or md5sum (Linux).

Comparing without mistakes

Sixty-four hex characters are easy to misread. Paste both values into the compare box on the file checksum tool, or on Linux use echo "expected filename" | sha256sum -c. Case does not matter; spaces and dashes between groups are ignored by our tool. Make sure you are comparing the same algorithm: a 32-character published value is MD5, 40 is SHA-1, 64 is SHA-256. The hash identifier tells you which from the string alone.

When it does not match

  1. Check the algorithm. Comparing a SHA-256 you computed with an MD5 they published will never match.
  2. Re-download from the official site, not a mirror or a link in an email. Interrupted downloads are the usual cause.
  3. Check the version. Publishers update files and sometimes forget to update the checksum, or you downloaded a newer build than the one listed.
  4. If it still fails, do not run the file. Report it to the publisher. A persistent mismatch from the official source is a security incident.

The limits of a checksum

A checksum on the same page as the download proves only that the file matches what that page says. If the page itself was compromised, both would have been replaced together. Stronger assurance comes from signatures: a GPG signature or Sigstore attestation made with the publisher’s private key, verified against a key you obtained separately. Where a project offers both, verify the signature; the checksum is the quick check for everyday downloads.

New tools and guides, about once a month.

No tracking pixels, no upsells. Unsubscribe with one click.

Newsletter