What a checksum actually is
A checksum is a fingerprint for a file. Run an algorithm like SHA-256 over it and you get a long, fixed string of letters and numbers. Change a single byte anywhere in that file — a corrupted transfer, a tampered copy — and the whole string comes out completely different.
That makes it a perfect honesty check. Reputable publishers print the SHA-256 of their downloads right on the release page. If your copy produces the same string, your file matches theirs bit for bit. If it does not, something got lost or swapped along the way, and the file should not be trusted.
One honest caveat: a matching hash proves the file is identical, not that it is safe. You are still trusting the publisher — which is exactly why the hash should come from their official page and not from a random mirror.
- A matching hash means "same file", not "safe file" — trust the source first
- Prefer SHA-256 or better; treat MD5 as a typo check, nothing more
Windows: PowerShell
Windows can do this out of the box — no downloads, no extras. Open PowerShell (press Start, type "powershell", hit Enter) and run:
After a moment you get a long string like B1C2D3... That is your file's SHA-256 fingerprint. Little time saver: drag the file straight into the PowerShell window and its full path appears, so you do not have to type it.
Get-FileHash .\Downloads\app-setup.exe -Algorithm SHA256macOS and Linux
On macOS, shasum ships with the system. On Linux, the coreutils package gives you sha256sum. Both print the hash followed by the file name:
Bonus on Linux: many projects ship a small .sha256 file next to the download. If you have it, run sha256sum -c project.zip.sha256 in the same folder and the tool does the comparing for you.
# macOS (preinstalled)
shasum -a 256 ~/Downloads/project.zip
# Linux (coreutils)
sha256sum ./project.zipCompare it with the publisher
Now find the published hash. It belongs on the project's own site, its official release page, or its documentation — never on a mirror, and never only inside the download itself. Copy it, then compare character by character. These strings are long and human eyes are lazy, so let the computer do it:
The PowerShell line prints True or False. The Linux and macOS line prints a friendly OK or a failed message. If the comparison fails, do not run the file. Redownload from the official page, and if it still mismatches, tell the publisher — they would want to know.
# PowerShell: prints True when the hashes match
(Get-FileHash .\app-setup.exe -Algorithm SHA256).Hash -eq "PUBLISHED_HASH_GOES_HERE"
# macOS and Linux: verify against a published hash
echo "PUBLISHED_HASH_GOES_HERE project.zip" | sha256sum -c -- Extra letters, a different length or a trailing word all mean: stop
- Some projects also sign files with GPG — a stronger check worth learning next