← All tools

Hash calculator

Calculate a file or text checksum and compare it with an expected hash.

File and text hashes

Calculate a SHA checksum in this browser and compare it with an expected value. Your input stays on your device.

Text is encoded as UTF-8 without trimming or Unicode normalization. Spaces, line breaks, and any existing BOM character matter. Browsers may normalize pasted line endings; use file input to preserve original file bytes.

File contents are hashed exactly as raw bytes, including BOM, CRLF, binary data, and NUL. The filename does not affect the hash.

Typing or pasting text clears the file. Choosing a new file clears the text. Empty text and empty files are valid inputs.

File limit: 20 MiB (20,971,520 bytes). Text limit: 2 MiB (2,097,152 UTF-8 bytes). The whole input is read into memory; this API does not stream.

Enter text or choose a file. Empty text can also be hashed.

Paste only hexadecimal characters: SHA-256 needs 64, SHA-384 needs 96, and SHA-512 needs 128. Letter case and surrounding whitespace are ignored.

Calculate a current hash before comparing.

Worked example

Check a renamed delivery file and a one-byte quantity change

These three fictional delivery notes let you distinguish a filename change from a content change. All are 50-byte UTF-8 files with LF line endings, no BOM and a final newline. The renamed copy has identical bytes; the changed copy replaces the 0 in quantity=10 with 1.

Files for this example

Example input

package=training-materials
revision=7
quantity=10
  1. Download the original, renamed and changed files below. Choose File raw bytes and SHA-256. Select data-delivery-original.txt, calculate it, and confirm 50 bytes. Paste its full reference hash below into Expected checksum.
  2. Select data-delivery-renamed.txt and calculate again with the same expected checksum. It still matches: the filename is not part of the hashed file content.
  3. Select data-delivery-changed.txt and calculate again. The byte count is still 50, but the original checksum no longer matches. Open the notes as text to compare quantity=10 with quantity=11.
  4. Use the supplied checksum list to check the complete values, then save a report if needed. For a real delivery, get the expected checksum from a source you trust independently of the received file.

What to check in the result

The original and renamed copies have the same SHA-256. Changing one byte gives a different checksum despite the unchanged 50-byte length; full values are below. Measured on 2026-10-22 with this site’s hash core and Node WebCrypto, cross-checked with node:crypto. These are fictional practice files; a matching hash does not establish file safety or the author’s identity.

data-delivery-original.txt
50 B / SHA-256 7646f6bd613a6ff5aa07497b94de67e3abb3070c13872294175036a773ef9a90

data-delivery-renamed.txt
50 B / SHA-256 7646f6bd613a6ff5aa07497b94de67e3abb3070c13872294175036a773ef9a90

data-delivery-changed.txt
50 B / SHA-256 695efacc8f9eb57a8335de9ebec05a568033961770df9ee5e88a27311abb4de3

Troubleshooting

The original sample does not match the displayed checksum.
Select the downloaded file directly in File raw bytes mode. Pasting its text can change line endings or lose the final newline. Confirm SHA-256 and 50 bytes, and copy all 64 hexadecimal characters without a filename or prefix.
The same byte count gives a different checksum.
Byte count only measures length. In this example, replacing one digit keeps 50 bytes but changes the contents. A renamed file with untouched contents keeps its hash; resaving a document can change its contents or metadata.
Does a match mean the file is safe?
It matches the expected bytes. It does not scan for malware or prove who published the reference value. Confirm the source and use the appropriate checks before opening an untrusted file.