Dev Tools

How to Verify a Downloaded File Wasn't Corrupted or Tampered With

Software downloads, especially from open-source projects, often list a hash value right next to the download link — a long string labeled SHA-256 or MD5. It looks like technical clutter until you understand what it's actually for: proving the file you downloaded is exactly, byte-for-byte, the file that was published.

What a hash actually is

A hash function takes any input — in this case, an entire file — and produces a fixed-length string that acts as a unique fingerprint of that exact data. Change even a single byte of the file, and the resulting hash comes out completely different. That property is what makes it useful for verification: if your downloaded file produces the same hash as the one the publisher listed, you can be confident the file arrived intact and unmodified.

Why this matters

  • Corrupted downloads. A large file transferred over an unreliable connection can occasionally end up with a few corrupted bytes — hashing catches this even when the file otherwise "looks" fine.
  • Tampering. If a download source is compromised and a malicious version of a file gets substituted, its hash won't match the original publisher's listed value — an immediate red flag.
  • Confirming you have the right version. When multiple versions of a file exist, the hash confirms you actually have the specific one you intended.

How to check

  1. Generate the hash of your downloaded file using the same algorithm the publisher listed (commonly SHA-256 today; MD5 and SHA-1 are older and considered weaker, but still sometimes used for basic integrity checks rather than security).
  2. Compare it character-by-character against the published value.
  3. If they match exactly, the file is confirmed intact.

A hash isn't the same as encryption

It's worth being clear about what a hash does not do: it can't be reversed back into the original data, and it doesn't protect or hide anything — it's purely a fingerprint for comparison, not a way to secure the file's contents. Its entire job is verification, not confidentiality.

Need to verify a file or generate a hash? Try the Hash Generator — all hashing happens locally in your browser using the Web Crypto API.

Try the tool Hash Generator Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes