How to Check a File Hash (Checksum) on a Download
Some software publishers list a long string of letters and numbers next to each download, labeled SHA-256, checksum or hash. It lets you confirm that the file you received is exactly the file they released, not damaged in transit and not swapped for something else. This guide explains what a hash is, how to check one with our File Hash Generator, and, just as important, what a match does not prove.
What a hash is
A hash function takes any input, a word or a multi-gigabyte file, and produces a fixed-length result called a hash or digest. Think of it as a fingerprint:
- The same input always gives the same hash.
- Change anything, even one character, and the hash changes completely, not slightly.
- You cannot work backwards from the hash to the original.
- For a secure hash function such as SHA-256, nobody can practically create two different files with the same hash.
You can see the second point for yourself. In the File Hash Generator, type hello into the text box with SHA-256 selected. You get:
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Now change the first letter to a capital, Hello:
185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
One capital letter, and nothing in the two results lines up. The same happens with longer text: Family photos backup, drive 2, March gives a hash beginning 1d78115c and ending 79997, while Family photos backup, drive 2, Match, one letter different, gives one beginning c8c83917 and ending cc953b. That is why a hash is a good way to tell whether a file is exactly what it should be.
Checking a download, step by step
- Find the publisher's checksum. Look on the publisher's own download page or release notes, reached by typing its address or from a bookmark. Note which algorithm it uses; SHA-256 is the most common.
- Download the file from the publisher's own site or the official store.
- Open the File Hash Generator, choose the matching algorithm (SHA-256 is the default), and use "or hash a file" to pick the downloaded file. The file is read and hashed in your browser; nothing is uploaded. Very large files may take a while, or fail on a device with little memory.
- Paste the publisher's checksum into the box labeled "Compare with the checksum the publisher lists". Capital letters, spaces and colons are ignored.
- Read the result.
| Result | What it means | What to do |
|---|---|---|
| They match | The file is the one this checksum describes | Go ahead, if the checksum came from the publisher's own site |
| They do not match | The file is damaged or has been changed | Do not open or run it; delete it and download it again from the publisher's site |
| Looks like a different algorithm | The pasted checksum is the wrong length for the algorithm selected | Choose the algorithm the publisher used and hash the file again |
| Not a checksum | What you pasted is not a hash | Copy the checksum again, without extra text |
The length of a checksum tells you its algorithm, counted in hexadecimal characters: MD5 is 32, SHA-1 is 40, SHA-256 is 64 and SHA-512 is 128.
What a match proves, and what it does not
A match proves that the file is intact and is the file the checksum describes. If the checksum came from the publisher's own site over HTTPS, it shows that you received the publisher's file, not a damaged or altered copy.
A match does not prove the file is safe.
- If the publisher itself was compromised, or published something harmful, the checksum describes a harmful file and it will match perfectly.
- If the checksum came from the same page or mirror as the download, it proves very little: whoever could swap the file could swap the checksum too. Get the checksum from the publisher's own site, even if the download came from a mirror.
- A hash says nothing about what a program will do when it runs. Use it alongside the other habits in safe downloads and browser extensions, and keep your security software on.
A mismatch, on the other hand, is a clear answer: the file is not what the publisher released, whatever the reason.
MD5 and SHA-1: fine for accidents, not for security
MD5 and SHA-1 are older hash functions that are broken for security use: people can deliberately create two different files with the same MD5 or the same SHA-1 hash. That means a matching MD5 or SHA-1 checksum cannot rule out a deliberately altered file. They still catch accidental damage, such as a download cut short or a copy that went wrong, so an old checksum is better than none for that purpose.
Browsers cannot calculate MD5, so the File Hash Generator does not offer it; if you paste a 32-character checksum it is identified as MD5 with that warning. SHA-1 is offered only for matching old checksums and is labeled "broken for security use; legacy checksums only". For anything that matters, ask for a SHA-256 checksum.
Checking a backup copy
Hashes are just as useful for your own files. To confirm a backup copy is identical to the original:
- Hash the original file with SHA-256 and copy the result.
- Hash the copy on the backup drive.
- Paste the first hash into the compare box. A match means the copy is bit-for-bit identical.
This is a quick way to spot-check an important file, such as an archive of family photos or a business records file, when you test a restore. How to back up your files explains how often to test.
Hashing is not encryption
People often mix these up. A hash is one-way: it produces a fingerprint, and the original cannot be recovered from it. Encryption is two-way: it scrambles data with a key so that someone with the key can unscramble it. Encoding, such as Base64, is neither; it just rewrites data in another format that anyone can reverse. Hashing a file does not protect its contents. For that, see encryption explained.
Common mistakes
- Comparing only the first and last few characters by eye. Paste the whole checksum into the compare box.
- Comparing hashes made with different algorithms. They will never match.
- Taking the checksum from the same unofficial site as the download.
- Treating a match as a safety certificate. It is an integrity check.
Security software uses hashes too, as one way to recognize known malware; how antivirus works explains where that fits.