How to Verify File Integrity with Hashes

· 3 min read

When you download software, firmware, or important documents, how do you know the file is exactly what the publisher intended? File hashing gives you a cryptographic fingerprint — a unique string that changes if even a single byte of the file is different.

How file hashing works

A hash function reads every byte of a file and produces a fixed-length string. The same file always produces the same hash. Change one byte, and the hash changes completely.

Example:

This makes it easy to verify: generate the hash, compare it to the published hash, and you know instantly whether the file is authentic.

How to verify a file

  1. Find the official hash — the software publisher typically lists file hashes on their download page (often labeled "SHA-256 checksum" or "MD5 sum").
  2. Upload your downloaded file — select the file in the hash calculator. The hash is computed locally in your browser.
  3. Compare the hashes — if your calculated hash matches the official hash exactly, the file is authentic and uncorrupted.

When to verify file hashes

Supported algorithms

Algorithm Hash length Recommendation
MD5 32 characters Legacy only — not secure
SHA-1 40 characters Legacy only — not secure
SHA-256 64 characters Recommended standard
SHA-384 96 characters High security
SHA-512 128 characters Maximum security

Tips

Frequently Asked Questions

How do I compare a file hash to the official one?

After generating the hash, compare it character by character with the hash published by the file's source (usually on the download page). If every character matches, the file is authentic and uncorrupted. Even one character difference means the file has been modified.

Which hash algorithm should I use?

SHA-256 is the standard for file verification. Use whichever algorithm the publisher provides. If you have a choice, SHA-256 offers a good balance of security and performance.

Can a corrupted file have the correct hash?

It is theoretically possible (a collision) but statistically negligible with SHA-256. The odds are so astronomically low that for all practical purposes, matching hashes guarantee identical files.

Is my file uploaded to a server?

No. The hash is calculated entirely in your browser. Your file never leaves your device, making it safe for any file including sensitive documents.