File Checksum Calculator
Calculate and verify file checksums (MD5, SHA-1, SHA-256, SHA-384, SHA-512, CRC32) for many files at once, against a pasted hash or SHA256SUMS file
Drop files here or click to choose
No file selected
Files stay on your device and are hashed in a Web Worker, read in chunks, so large files do not need memory for the whole file (limit 2 GB per file).
0%
Results
Check that the file you have is the file you were meant to get
A download page often publishes a checksum next to the file. This tool calculates the checksum
of the file on your device, compares it with the one you paste and tells you whether they
match. You can paste a bare hash or a whole SHA256SUMS file, hash many files at
once, and get the output in the format that sha256sum -c reads. Files are read in
chunks, so a multi-gigabyte image does not need that much memory, and nothing is uploaded.
Verify a download in three steps
- Drop the file (or several files) on the page.
- Paste the expected checksum from the download page. The algorithm is recognised from the length: 8 hex characters is CRC32, 32 is MD5, 40 is SHA-1, 64 is SHA-256, 96 is SHA-384 and 128 is SHA-512. If that algorithm is not ticked, the tool ticks it for you.
- Press Calculate. The result says matches or does not match for the algorithm of the value you pasted.
The pasted text can also be a checksum file. Lines in the GNU format
(hash name or hash *name) and in the BSD format
(SHA256 (name) = hash) are understood, comments starting with #
are ignored, and the line whose file name equals the file you dropped is the one compared.
If you drop several files, each one is compared with its own line, and a file that the
checksum file does not list is reported as such.
A match is not always proof
Where the checksum comes from matters more than the algorithm. If the file and its checksum sit on the same server, whoever replaces the file can replace the checksum too. A checksum guards against corruption in transit. Against tampering it only helps when it reaches you by a different path (another site, a signed email, a repository) or when it is signed, for example with a detached GPG signature.
MD5 and SHA-1 are legacy. Practical collision attacks exist for both, so two different files can be built with the same checksum. They still detect accidental damage, but prefer SHA-256 when you have the choice. CRC32 is an error-detection code used by zip, gzip and PNG: it is trivial to forge and is offered here only to check those formats.
A hash covers bytes, not names or dates. Renaming a file or changing its modification
time does not change the checksum; a different line ending does. The text
a\n and a\r\n have different SHA-256 checksums, which is why a file
checked out with Windows line endings no longer matches the published hash. Re-creating a zip
also changes it, because the archive stores timestamps.
Hex, Base64 and Subresource Integrity
Every algorithm is shown as hex (what download pages and sha256sum print) and as
Base64 (what some APIs and package manifests use). For SHA-256, SHA-384 and SHA-512 the
result also includes the value of the HTML integrity attribute, such as
sha384-…, so you can pin a script or stylesheet loaded from a CDN. Cross-origin
resources also need crossorigin="anonymous" for the browser to apply the check.
With a single algorithm selected, the output box uses the GNU checksum file format (the hash,
two spaces, the name), ready to save as SHA256SUMS next to a release and verify
with sha256sum -c on Linux or shasum -a 256 -c on macOS. With several
algorithms it lists them per file.
How big files are handled, and the limits
The file is read in 4 MB chunks inside a Web Worker and every selected algorithm is updated in the same pass, so reading the file once gives all the checksums and memory use stays around one chunk. Hashing runs in JavaScript because the Web Crypto API cannot hash a file piece by piece. Speed depends on the algorithm: in measurements with Node.js the hasher reached about 130 MB/s for SHA-256 and about 17 MB/s for SHA-512, and a browser will differ. The result shows how long each file took.
Limits: 2 GB per file, no folders (drop the files inside), no signature checking, and no
keyed hashes (use the HMAC generator for those). An empty file is valid: its SHA-256 is
e3b0c442…b855.
Code Examples
The same checksum with the tools already on your system
printf 'abc' > abc.txt
sha256sum abc.txt # Linux
shasum -a 256 abc.txt # macOS
# ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad abc.txt
md5 abc.txt # macOS (BSD format)
# MD5 (abc.txt) = 900150983cd24fb0d6963f7d28e17f72
# Windows: certutil -hashfile abc.txt SHA256
# PowerShell: Get-FileHash abc.txt -Algorithm SHA256Verify with a checksum file (GNU format: hash, two spaces, name)
printf '%s abc.txt\n' ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad > SHA256SUMS
shasum -a 256 -c SHA256SUMS # Linux: sha256sum -c SHA256SUMS
# abc.txt: OKSubresource Integrity value from the command line
openssl dgst -sha384 -binary abc.txt | openssl base64 -A
# ywB1P0WjXou1oD1pmsZQBycsMqsO3tFjGotgWkP/W+2AhgcroefMI1i67KE0yCWn
# use it as: integrity="sha384-ywB1P0Wj…" crossorigin="anonymous"Node.js: hash a large file without loading it
import { createHash } from "node:crypto";
import { createReadStream } from "node:fs";
const hash = createHash("sha256");
for await (const chunk of createReadStream("abc.txt")) hash.update(chunk);
console.log(hash.digest("hex"));
// ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015adStandards & Specifications
- FIPS 180-4 — Secure Hash Standard (SHA-1, SHA-2) — Defines SHA-1, SHA-256, SHA-384 and SHA-512
- RFC 1321 — The MD5 Message-Digest Algorithm — Defines MD5; the RFC itself notes it is not collision resistant
- W3C Subresource Integrity — Defines the integrity attribute and its sha256, sha384 and sha512 values
- RFC 1952 — GZIP file format (CRC-32) — Describes the CRC-32 used by gzip; zip and PNG use the same polynomial
Frequently Asked Questions
How do I verify a download against the checksum on the site?
Drop the file, paste the checksum into the expected box and press Calculate. The tool guesses the algorithm from the length (32 hex characters is MD5, 40 SHA-1, 64 SHA-256, 128 SHA-512), ticks it if needed and tells you whether the value matches.
Can I paste a SHA256SUMS file instead of one hash?
Yes. Lines in the GNU format (hash, two spaces, name) and the BSD format (SHA256 (name) = hash) are read, and the line with the name of your file is the one compared. With several files, each is compared with its own line.
The checksums match. Is the file safe?
It is the same file the checksum was made for, nothing more. If the checksum came from the same server as the file, an attacker who replaced one could replace the other. Take it from a separate source or verify a signature when the file is critical.
Why does my checksum not match when the file looks identical?
A hash covers every byte. Common causes are a different line ending (LF versus CRLF changes the hash), a download that was interrupted or converted, a re-created zip archive, or comparing different algorithms. The length of the expected value tells you which algorithm it is.
Which algorithm should I use?
SHA-256 for almost everything. Use the algorithm the publisher gives you when you only need to verify. MD5 and SHA-1 have practical collision attacks and CRC32 is only an error-detection code, so they do not protect against deliberate tampering.
Is the file uploaded anywhere? Can I hash a multi-gigabyte file?
Nothing is uploaded: the file is read in your browser in 4 MB chunks, so memory use does not grow with the file size. The limit is 2 GB per file. SHA-512 is the slowest algorithm in the browser, so tick only the ones you need.
What is the Subresource Integrity column?
It is the value for the integrity attribute of a script or link tag, for example integrity="sha384-..." crossorigin="anonymous". The browser refuses to run the resource if it does not match, which protects you from a modified file on a CDN. It is shown for SHA-256, SHA-384 and SHA-512.
Can I generate a SHA256SUMS file for my release?
Yes. Drop all the files, keep one algorithm selected and copy the output: each line is the hash, two spaces and the file name, which sha256sum -c and shasum -a 256 -c can verify.