What is a file hash?
A file hash (or checksum) is a short fingerprint calculated from the full contents of a file. Change a single bit in the file and the hash changes completely; identical files always give the same hash. Software sites publish the hash of each download, so after downloading an installer, an ISO image or a backup you calculate the hash of your copy and compare. If they match, the file arrived intact and was not altered along the way (provided you got the published hash from a trustworthy place). It is also how you tell whether two files are identical without opening them.
This file hash calculator supports MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA3-256, SHA3-512, BLAKE3 and CRC32. By default it shows MD5, SHA-1, SHA-256 and SHA-512. Large files are read in 8 MB pieces with a progress bar, so a multi-gigabyte ISO does not freeze the page, and the file is never uploaded: it is hashed by your browser. You can paste the hash the site published and the tool tells you whether it matches, even guessing the algorithm from its length (32 hex characters is MD5, 40 is SHA-1, 64 is SHA-256, 128 is SHA-512).
How to check a file's hash
- Drop one or more files on the page, or click to choose them. An example file with the text
abcis preloaded so you can see how it works. - In "Algorithms", tick the ones you need. The site you downloaded from usually says which one it published; SHA-256 is the most common.
- Wait for "Reading the file" to reach 100%. You can stop it with "Stop" and add the file again later.
- Paste the published hash in "Compare with a hash". The tool answers "It matches the SHA-256 of this file: the file is intact", or says it does not match and tells you which algorithm a hash of that length is.
- Use "Show in UPPERCASE" if the site shows capital letters (case does not matter for the comparison).
- Copy any hash with "Copy". "Clear the list" removes the files.
Examples
The three letters "abc"
The file example.txt holds abc and gives:
MD5 900150983cd24fb0d6963f7d28e17f72
SHA-1 a9993e364706816aba3e25717850c26c9cd0d89d
SHA-256 ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
CRC32 352441c2You can confirm them with printf abc | shasum -a 256.
A match
Pasting BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD (capitals) with SHA-256 ticked reports a match, because the comparison ignores case.
A hash of another algorithm
Pasting a9993e364706816aba3e25717850c26c9cd0d89d while only SHA-256 is ticked reports that it does not match any ticked hash and that a hash this long is SHA-1: tick SHA-1 to compare.
An empty file
The SHA-256 of an empty file is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. If you see it for a download, the file is 0 bytes and the download failed.
SHA3-256 is not SHA-256
For abc, SHA3-256 gives 3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532, a different value from SHA-256 although both have 64 hex characters.
Common mistakes
- Comparing the wrong algorithm. A 64-character hash may be SHA-256, SHA3-256 or BLAKE3. Use the one the site names.
- Copying the hash with spaces or a file name. Paste only the letters and digits (0-9, a-f).
- Trusting a hash from the same compromised page. The hash proves integrity, not authenticity. For authenticity, check a signature or get the hash from a separate trusted channel.
- Using MD5 or SHA-1 for security. Practical collisions exist for both. They are fine to detect accidental corruption, but use SHA-256 or better when someone may attack the file.
- Hashing text instead of a file. A hash of the text
abctyped in a box equals the file only if there is no extra line break. For text, use hash text. - Hashing a partial download. A different size or hash usually means the download did not finish.
FAQ
Does my file get uploaded?
No. It is read in pieces and hashed by your browser; it is never sent.
Which algorithm should I use?
The one the publisher gives. For your own checks, SHA-256 is the common choice; BLAKE3 is very fast for large files; CRC32 only detects accidental errors.
Can a hash be reversed to get the file?
No. A hash is one-way and does not contain the file.
Why do two files have the same hash?
If they are identical, they must. Different files with the same SHA-256 have never been found in practice.
How is this different from hashing a text?
This tool reads the bytes of a file. To fingerprint typed text, use hash text; to hash a password for storage, use bcrypt.
Calculate a file hash on the command line
Bash
shasum -a 256 file.iso # macOS / Linux
sha256sum file.iso # Linux
certutil -hashfile file.iso SHA256 # WindowsPython
import hashlib
h = hashlib.sha256()
with open("file.iso", "rb") as f:
for chunk in iter(lambda: f.read(8 * 1024 * 1024), b""):
h.update(chunk)
print(h.hexdigest())