Skip to content
📁

File Checksum Verifier

Compute SHA checksums for any file and compare against an expected value.

Runs in your browser

Updated

No file chosen

—

Hashed in the tab

Choose a file and the page reads it, passes the buffer to crypto.subtle.digest and prints the digest as lowercase hexadecimal. The menu offers SHA-256, SHA-512 and SHA-1 with SHA-256 selected at load, and changing it re-runs the hash immediately. The file name is shown with its size formatted for your locale, so a one-mebibyte file appears as 1,048,576 bytes.

A worked example

A five-byte file containing "hello" gives the SHA-256 value 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. Add one newline so the file is six bytes and the digest changes entirely, to 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03. Switch to SHA-1 and the same five bytes give 40 characters, aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d.

How the comparison works

The expected field is trimmed, lowercased and stripped of whitespace before comparison, so line wrapping copied from a download page causes no false mismatch. Nothing else is normalised: dashes, colons and a leading 0x all count against you, and a 32-character MD5 pasted against a SHA-256 result can never match.

When hashing fails

Errors are caught and replaced with "Could not hash this file in your browser." on the digest line, and the stored hash is cleared, so a pasted expected value drops back to "Hash a file first." even though a file is selected. The usual causes are a file too large to read into memory and a page served over plain HTTP, where WebCrypto is not exposed.

Where it stops

  • No MD5 or CRC-32, because WebCrypto does not provide them.
  • The whole file is read into memory, so multi-gigabyte images may fail.
  • One file at a time, with no folder hashing and no saved history.
  • Comparison is exact-string only and cannot tell you which algorithm the expected value belongs to.

Questions people ask

Which algorithm should I compare against?

Whichever one the publisher lists. SHA-256 is the common choice for releases and SHA-1 only where an older page still offers it. To hash pasted text rather than a file, use the hash generator.

Does a matching checksum prove the download is safe?

It proves the bytes match the checksum, not that the checksum came from the real publisher. To work out what algorithm an unknown value belongs to, the hash identifier reads its shape.