File hash checker
How to check a file against its checksum
- Copy the checksum from the publisher's download page. It is 32 to 128 letters and digits (0 to 9 and a to f), usually labelled SHA-256 or MD5.
- Look at the ticks above the file box. MD5, SHA-1, SHA-256 and SHA-512 are ticked when the page opens. Keep the one the publisher lists ticked, because the page can only compare with a checksum it has calculated.
- Choose the file. The page reads it from your disk in 8 MB pieces and shows a progress bar. Cancel stops the run at any point.
- Paste the publisher's checksum into the compare box.
- Read the verdict. Match, with the algorithm name, means the file is the one the checksum was made from. No match means it is not. Download the file again.
What the file hash checker does
A checksum is a short fingerprint of a file. Change one bit anywhere in the file and the fingerprint changes completely. Publishers print it beside the download so you can confirm that the copy on your disk is the copy they made.
This page calculates five fingerprints in one pass: MD5, SHA-1, SHA-256, SHA-384 and SHA-512. SHA-384 starts unticked. Untick the ones you do not need, since each adds work.
The file is read in 8 MB slices. Each slice goes to every ticked algorithm and is then dropped, so memory use follows the slice size and not the file size. The hashing code is hash-wasm 4.12.0 (216 kB), downloaded from jsDelivr the first time you choose a file and checked against a fixed integrity hash before it runs. The browser's own Web Crypto cannot do this job: it has no MD5 and it cannot hash a file piece by piece.
We compared the page with sha256sum, md5sum, sha1sum, sha384sum and sha512sum from GNU coreutils on four sample files (127 bytes to 247 kB), on an empty file and on the text abc. All five checksums were identical every time. The SHA-256 of an empty file is a quick sanity test: it should start with e3b0c442 and end with b855.
Comparing with the publisher's checksum
We pasted the same SHA-256 in 11 layouts and the page matched all 11. Paste whatever the publisher gave you:
- lower case, and UPPER CASE
- byte pairs separated by colons, and by spaces
- a
sha256:prefix - a BSD-style line,
SHA256 (name) = hash - a
sha256sumline in text mode (hash, two spaces, name) and in binary mode (hash, a space, an asterisk, name) - a line that ends in a Windows line break, and a hash in quotes with spaces around it
- three lines laid out like PowerShell Get-FileHash output, a table with Algorithm, Hash and Path columns
The page picks the algorithm from the length: 32 characters is MD5, 40 is SHA-1, 64 is SHA-256, 96 is SHA-384 and 128 is SHA-512. A string of 63 or 65 characters, a string with a stray letter such as g in it, and plain text all got "That does not look like a checksum." One changed character in a correct SHA-256 got No match.
Two behaviours can mislead you, so read this before you trust a No match. The first is the ticks. If you untick an algorithm and then paste its checksum, the page still answers No match and says the checksum looks like, for example, SHA-1, although it never calculated the file's SHA-1. We saw this with SHA-1, MD5 and SHA-512. Once we ticked SHA-1, the same paste matched. A No match for an unticked algorithm means nothing yet.
The second is that the page reads only the first checksum it finds in the pasted text. We pasted two lines, the first one wrong and the second one right, and got No match. If the publisher gives a list of files (a SHA256SUMS file, for example), paste only the line for your file. The page does not open .sha256 files either, so copy the text out of them.
What a match proves, and what it does not
A match means the file on your disk is bit for bit the file the checksum was made from. That catches a cut-off download and a mirror that serves the wrong build.
It says nothing about whether the publisher can be trusted. An attacker who can change the download can often change the checksum printed next to it. When you can, take the checksum from a different place than the file: the publisher's official site over HTTPS, or a signature that you check with the publisher's key. Some publishers, Microsoft among them for Windows ISOs, list SHA-256 values on the download page or in a separate hash-value document.
If you can choose, use SHA-256 or SHA-512. MD5 and SHA-1 have known collision attacks: someone can build two different files with the same checksum. That matters when you worry about a deliberate swap. For spotting a damaged download, an MD5 from the publisher still does the job.
Large files, speed and memory
We generated files of 100 MB, 1 GB and 2 GB and ran the page on each, once with only SHA-256 ticked and once with all five ticked. Every checksum matched the system tool. The table below has the times.
Speed depends on your machine. Ours had one CPU core, so a laptop with a faster core should do better. All five together cost about 2.5 times as much as SHA-256 alone (16.4 s against 6.6 s at 1 GB), so untick what you do not need.
Memory stayed flat. The browser's processes used about 430 MB before a run and peaked at 546 to 623 MB at 1 GB and at 2 GB, the same at both sizes, because the page holds one 8 MB piece at a time.
Cancel works while a file is being read. On a 1 GB file with all five ticked, Cancel after 1.7 s showed "Cancelled." within 0.3 s and no checksums, and the next file was hashed normally.
Windows, macOS and Linux have this built in
Every desktop system can do this without a web page. In Windows PowerShell: Get-FileHash .\file.iso -Algorithm SHA256. In Command Prompt: certutil -hashfile file.iso SHA256. On Linux: sha256sum file.iso. On macOS: shasum -a 256 file.iso. We ran sha256sum and md5sum for this page. We did not run the Windows or macOS commands.
The built-in tools are faster. On the same machine sha256sum took 0.79 s for 1 GB and 1.71 s for 2 GB, against 6.6 s and 12.9 s in the page, about 8 times faster. Use them for batches of files and for multi-gigabyte images. The page fits better on a computer where you cannot open a terminal, or when you want several algorithms and the comparison in one step.
What leaves the page
The file, its name and its checksums stay in the tab. In our network test the file was called secret-name-Q7.txt and held a marker string. The page made three requests to other hosts: the ad script and the Google tag, which load on every GramFile page, and one request for the hashing library when the file was chosen. None of the three carried a body, and none contained the file name or the marker.
If the library cannot be loaded, or the file that arrives is not the expected one, the page says so and shows no checksums. We tested both by blocking the request and by serving a changed file.
When the checksums do not match
- Check the ticks. The algorithm of the checksum you pasted must be ticked.
- Check the line you pasted. The page reads the first checksum in the text.
- Compare the size on disk with the size on the download page, since a cut-off file is a common cause.
- Check the file is the right one. Many sites publish separate checksums for each version, language and 32-bit or 64-bit build.
- Check the file as downloaded. Opening and saving a text file, or unpacking and repacking an archive, changes its bytes.
- Download it again, from the same source if you can, and check the new copy. If it fails twice, ask the publisher.
Measured results
| File or setting | What we ran | What came out |
|---|---|---|
| 127 B text, 1.4 kB and 5.6 kB PDFs, 247 kB JPG | All five checksums | Identical to md5sum, sha1sum, sha256sum, sha384sum and sha512sum |
| Empty file, and the text abc | All five checksums | SHA-256 of the empty file e3b0c442 to b855; abc gives ba7816bf to 15ad; both equal sha256sum |
| 100 MB | SHA-256 only, then all five | 0.9 s, then 2.1 s (sha256sum 0.09 s) |
| 1 GB | SHA-256 only, then all five | 6.6 s, then 16.4 s (sha256sum 0.79 s) |
| 2 GB | SHA-256 only, then all five | 12.9 s, then 33.3 s (sha256sum 1.71 s) |
| Browser memory, 2 GB | SHA-256 only, then all five | Peak 623 MB, then 559 MB, from about 440 MB idle |
| 1 GB, Cancel after 1.7 s | All five checksums | Cancelled. in 0.3 s, no checksums, next file works |
| One SHA-256 in 11 layouts | Paste into the compare box | 11 of 11 matched |
| 63 or 65 characters, a stray g, plain text | Paste into the compare box | That does not look like a checksum, all four |
| SHA-1 pasted, SHA-1 unticked | Paste into the compare box | No match; after ticking SHA-1 the same paste matched |
| Two lines pasted, first one wrong | Paste into the compare box | No match; only the first checksum is read |
| Library blocked, or a changed library file | Choose a file | Hashing library could not be loaded, no checksums shown |
| File named secret-name-Q7.txt with a marker | Network test | 3 outside requests, 0 with a body, 0 naming the file or marker |
Prefer desktop software?
The page is enough for one file on a PC where you cannot install anything. For many files, scripts, or disk images of several gigabytes, use PowerShell, certutil or sha256sum: they ran about 8 times faster in our test and can check a whole list of files at once. A disc image such as the Windows 11 ISO is a common reason to check a hash, and 7-Zip can show SHA-256 from its CRC SHA menu.
Frequently asked questions
Is my file uploaded to check it?
No. The file is read inside your browser tab in 8 MB pieces. In our test three requests went to other hosts (the ad script, the Google tag and the hashing library). None had a body and none contained the file name or its content.
Which checksum should I use, MD5 or SHA-256?
The one the publisher lists. If you can choose, take SHA-256 or SHA-512. MD5 and SHA-1 have known collision attacks, which matters when you worry about a deliberate swap, while for spotting a damaged download an MD5 still works.
Why does it say No match when the file is fine?
Check three things first. The algorithm of the pasted checksum may be unticked, you may have pasted several lines and the page read the first, or the checksum may belong to another version or build of the file. If none of those applies, download the file again.
How big a file can it check?
We tested up to 2 GB. The page reads the file in slices, so memory use stays about the same at 1 GB and 2 GB, and it sets no size limit of its own. We have not tested anything larger.
How long will a 4 GB ISO take?
We did not test 4 GB. On our one-core test machine SHA-256 took 12.9 s for 2 GB and all five checksums took 33.3 s. If the speed holds, a 4 GB file would take about twice as long. A faster computer will do better.
Can I check several files at once?
No, the page takes one file at a time. Choosing another file replaces the result. In our test the second file replaced the first.
Does it hash typed text, or do HMAC, CRC32 or SHA-3?
No. It works on files only and calculates MD5, SHA-1, SHA-256, SHA-384 and SHA-512.
Does it work offline?
Not completely. The hashing library is downloaded from jsDelivr when you first choose a file. Without a connection the page shows an error and no checksums, which we tested by blocking the request.