Get the SHA-256 checksum of a file
A checksum is a fixed-length fingerprint computed from a file's bytes: change even one bit of the file and the fingerprint changes completely, so matching checksums prove two copies are identical. This page computes the SHA-256 and SHA-1 digests of any file — PDF, installer, ZIP, video, anything — using your browser's built-in cryptography engine, shows both hex digests for comparison, and can download a sha256sum-compatible .txt report. The file is hashed on your device and never uploaded.
How it works
A cryptographic hash function takes an input of any length and produces a fixed-length output — 256 bits (64 hex characters) for SHA-256, 160 bits (40 hex characters) for SHA-1 — with three properties that make it useful as a fingerprint: the same input always yields the same digest, the digest reveals nothing useful about the input, and it is computationally infeasible to find two different inputs that share a digest. Internally, SHA-256 splits the file into 512-bit blocks and feeds each through 64 rounds of mixing operations that cascade every input bit across the whole internal state, which is why flipping a single bit anywhere in a gigabyte file produces a completely different digest — the avalanche effect.
This tool reads your file into memory and passes its bytes to crypto.subtle.digest(), the Web Crypto API implemented natively inside the browser. That means the hashing code is the browser vendor's audited C++ implementation, not JavaScript arithmetic, so it is fast — hundreds of megabytes per second on typical hardware — and it runs entirely offline: nothing about the file, not even its name, leaves your machine. Both digests are then formatted as lowercase hexadecimal, and the downloadable report follows the sha256sum convention of "digest, two spaces, filename" per line, so tools that consume such files can verify it directly.
SHA-1 is included for one reason only: legacy comparison. Older software releases, torrents, and archival records often published SHA-1 digests, and you may need to check against them. But SHA-1's collision resistance is broken — the SHAttered project demonstrated two different PDF files with the same SHA-1 digest in 2017 — so a SHA-1 match should never be treated as proof of integrity where an adversary is possible. When you have a choice, publish and verify SHA-256.
Worked example: verifying a downloaded installer
A sysadmin downloads a 312 MB Linux ISO whose release page states an official SHA-256 of 9f86d081…0015d. She drops the ISO onto this tool; hashing takes about two seconds, and the SHA-256 line reads 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 — identical to the published value character for character, so the download is bit-perfect and untampered.
She then downloads the .txt report, which contains one sha256sum-formatted line, and stores it beside the ISO in the archive. Six months later, anyone can re-verify the stored copy from a terminal with shasum -a 256 -c report.txt on macOS/Linux, or by running certutil -hashfile image.iso SHA256 on Windows and comparing the output by eye. A colleague's copy that had suffered a truncated transfer produced e3b0c442… instead — a completely different digest from a file that differed only in its final kilobyte.
Frequently asked questions
What is a file checksum used for?
A checksum is a short fingerprint computed from a file's bytes; if two copies produce the same SHA-256 digest, they are byte-for-byte identical. People use checksums to verify downloads against a publisher's stated hash, to confirm a transfer or backup was not corrupted, and to prove a document has not changed.
How do I verify a SHA-256 checksum on Mac, Linux, or Windows?
On macOS or Linux run shasum -a 256 yourfile in a terminal; on Windows run certutil -hashfile yourfile SHA256. Compare the printed digest with the one shown here — every character must match.
Why does this tool still show SHA-1 if it is broken?
Many older release pages, archives, and tools still publish SHA-1 digests, so you need the value to compare against them. Practical collisions have been demonstrated since 2017, which is why SHA-1 is labeled legacy here and SHA-256 is the value to rely on.
Can two different files have the same SHA-256 hash?
In theory yes, since infinitely many files map to 2^256 possible digests, but no SHA-256 collision has ever been found and constructing one is far beyond current computing power. For any practical purpose, a matching SHA-256 digest means the files are identical.
Does a matching checksum mean the file is safe?
No — it only proves the file is exactly the one that produced the published hash. If the publisher's file was itself malicious, or an attacker replaced both the download and the posted hash, the checksum still matches; it verifies integrity, not trustworthiness.
Is there a size limit, and is my file uploaded?
The file is hashed on your own device by the browser's built-in crypto engine and is never uploaded, so it works offline too. Files up to a few gigabytes work; the practical limit is your device's memory.