How to Verify File Integrity with Checksums

What is a checksum?

A checksum is the fixed-length value produced by running a hash function over an entire file. Because hashing is "deterministic" and exhibits the "avalanche effect"—the same file always computes to the same value, and changing even a single byte makes the result completely different—this value works as a file's digital fingerprint.

Software publishers usually post an official checksum (most commonly SHA-256) on their download page. After downloading a file, you compute its checksum yourself and compare it with the official one: a match means the file is intact; a mismatch means the file was corrupted in transit, or tampered with by someone.

Why verify files?

Verifying a checksum mainly guards against two situations:

For important software like operating system images, development tools, and cryptocurrency wallets, verifying checksums is a habit worth cultivating.

Tip: To guard against malicious tampering, make sure the official checksum isn't sitting on the same compromised server as the file. It's best to cross-check the checksum itself from the official main site, a signed announcement, or multiple sources to confirm it's genuine.

The basic verification process

  1. Download the file.
  2. Find the corresponding checksum on the official page, and confirm which algorithm it uses (MD5, SHA-1, or SHA-256).
  3. Use a tool or command to compute the checksum of the downloaded file with that same algorithm.
  4. Compare the two values. Hash comparison is case-insensitive; only the character order needs to match.
  5. If they match, use the file with confidence; if not, re-download it or try a different download source.

How to compute it on Windows

Windows has the built-in certutil command, so no software needs to be installed. Open Command Prompt or PowerShell and enter:

certutil -hashfile C:\path\to\file.iso SHA256

Replace SHA256 with MD5 or SHA1 to compute other algorithms. If you prefer PowerShell, the more intuitive Get-FileHash also works:

Get-FileHash C:\path\to\file.iso -Algorithm SHA256

How to compute it on macOS

macOS ships with the relevant commands; just open "Terminal" to use them. To compute SHA-256:

shasum -a 256 /path/to/file.iso

After -a you can put 1 (SHA-1), 256 (SHA-256), or 512 (SHA-512). To compute MD5, use a separate command:

md5 /path/to/file.iso

How to compute it on Linux

Most Linux distributions include these tools built in, with a dedicated command for each algorithm:

md5sum    file.iso
sha1sum   file.iso
sha256sum file.iso
sha512sum file.iso

If the official provider supplies a checksum file like SHA256SUMS, you can have the system compare automatically; a match shows OK:

sha256sum -c SHA256SUMS

Command quick reference per system

SystemSHA-256 command
Windowscertutil -hashfile file SHA256
macOSshasum -a 256 file
Linuxsha256sum file

Use this tool to save effort

If you don't want to memorize commands, or want to verify entirely in your browser, use this site's hash generator:

  1. Switch to the "File Hash" tab and drag the downloaded file in (or click to select it).
  2. Check the algorithm the official source uses, press compute, and you'll get the file's checksum.
  3. Paste the official checksum into the "Compare Hash" field, and the tool tells you instantly whether they match—no need to compare 64 characters by hand.

All computation happens locally in your browser, the file is never uploaded to any server, and even large files can be handled with confidence.

Tip: Comparing long hash values character by character is easy to get wrong. Use the tool's comparison feature—paste the value and let it judge match or mismatch—it's both fast and error-free.

Things to watch out for

Use the Hash Generator now