Home / Blog / Verifying a Download

Verifying a Download: The Two-Minute Habit That Proves a File Is Intact

Next to many downloads — installers, disc images, archives — sits a long string of hex characters. That string is a promise. Checking it takes two minutes and tells you whether the file you received is exactly the file that was published.

Why verify a download at all?

A file crosses a lot of hands on its way to you: the publisher's server, a content-delivery network, your internet provider, your own slightly elderly router. Things can go wrong at any hop. A download can be truncated by a dropped connection, corrupted by a failing disk, or — the case that makes headlines — replaced by an attacker with a lookalike that carries something extra. Most of the time, nothing goes wrong at all. Verification is how you know which time this is.

There is a second, quieter benefit: it catches your own mistakes. The wrong version, the 32-bit build instead of the 64-bit one, last month's installer still sitting in the folder — a hash mismatch exposes all of these before they waste your afternoon.

What a checksum actually is

A checksum — more precisely here, a cryptographic hash — is a fixed-length fingerprint computed from a file's contents. Feed any data into a hash function and it produces a short digest: 64 hex characters for SHA-256, whatever the input size. Change a single bit anywhere in the input, and the digest comes out completely different, in a way that cannot be predicted or steered. That sensitivity is the entire trick. If you compute the hash of the file on your disk and it matches the hash the publisher printed, you can be confident the two files are bit-for-bit identical. If even one character differs, they are not.

Two properties make this trustworthy. It is one-way: nobody can reconstruct the file from its hash. And it is collision-resistant: nobody can practically craft a different file that produces the same digest — at least, not with a modern algorithm. Which brings us to the choice of algorithm.

MD5 vs SHA-256: why the label matters

Older download pages offer MD5 checksums. MD5 was designed in the early 1990s and produces a 128-bit digest. As a corruption detector it still works — a randomly damaged file will essentially never produce the published MD5. But researchers have demonstrated practical ways to construct two different files with the same MD5 digest. Against a deliberate attacker, MD5 no longer proves anything.

SHA-256, part of the SHA-2 family, produces a 256-bit digest, and no practical collision attack against it is known. When a publisher offers both, verify the SHA-256. When they offer only MD5, treat the check as protection against accidents, not adversaries — fine for a font archive, thin for an operating system image.

Step by step: comparing the hashes

  1. Copy the published hash from a trustworthy page. Get it from the project's official site, ideally over HTTPS — not from a forum post or a mirror. Save it exactly; one missing character ruins the comparison.
  2. Note the algorithm. A 64-character hex string is SHA-256; 32 characters is MD5. Your computed hash must use the same algorithm or the two will never match.
  3. Compute your file's hash. Your operating system can do this without installing anything. On Windows, run certutil -hashfile filename SHA256 in a terminal. On macOS, run shasum -a 256 filename. On Linux, sha256sum filename. You can also paste a published hash or a test string into our Hash Generator to see how digests are produced and confirm the tool agrees with published test vectors.
  4. Compare the two strings carefully. Case does not matter; every character does. Comparing by eye is error-prone across 64 characters, so paste both into a text editor, or use the comparison habit that never fails: check the first six characters, the last six, and the length — then do one full pass. A mismatch in the middle is the classic miss.

What a match — and a mismatch — actually means

A match means the file on your disk is identical to the file the publisher hashed. It does not prove the publisher is honest or that the software is safe; it proves integrity, not virtue. A mismatch means stop. Delete the file and download it again, preferably from the official source. If a fresh download from the official page still mismatches, do not install it — report it to the project, because either their page or their file is wrong, and both possibilities matter.

The limits, honestly stated

Hash verification fails completely if the page publishing the hash is itself compromised, because the attacker simply prints the hash of the malicious file. That is why mature projects also sign their releases with digital signatures, a stronger mechanism we will cover another time. And a hash says nothing about whether genuine software is well-made. Verification answers one narrow question — "is this the file they published?" — and answers it completely. Two minutes, one command, no more guessing.

Try it: open the Hash Generator, paste any short piece of text, and watch how completely the digest changes when you alter a single letter.