SHA-256 hash

Calculate SHA-256 digests for text or files.

  • Runs locally
  • Free

Use the tool

Your files are processed in your browser and are not uploaded to a server.

About this tool

Calculate the SHA-256 hash of text or a file and compare it with an expected value to confirm that downloaded software or files were not altered or corrupted.

Typical uses

  • Verify an installer against the hash published by the vendor
  • Check whether two files are identical
  • Create a digest of a piece of text

How to use

  1. Enter text or choose a file and optionally supply an expected SHA-256 digest.

  2. Hash the text or file and inspect the digest and comparison result.

Good to know

Text is limited to 10 MB and files to 100 MB. A file is loaded entirely into browser memory.

The digest covers bytes, not text that looks the same

SHA-256 reacts to every single byte. “Hash text” first converts the text to UTF-8 bytes; “Hash file” uses the file’s raw bytes. You can reproduce every digest in this table with the tool (the CRLF row and the rows in other encodings only by hashing a file, as explained below):

InputEncodingBytes (hex)SHA-256
""UTF-8—e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
"abc"UTF-861 62 63ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
"Hello world"UTF-848 65 6C 6C 6F 20 77 6F 72 6C 6464ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c
"hello"UTF-868 65 6C 6C 6F2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
"hello\n"UTF-868 65 6C 6C 6F 0A5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03
"hello\r\n"UTF-868 65 6C 6C 6F 0D 0Acd2eca3535741f27a8ae40c31b0c41d4057a7a7b912b33b9aed86485d1c84676
"[BOM]hello"UTF-8EF BB BF 68 65 6C 6C 6F7489ebbcc2a00056ddaaaac190bce473e5c03696ea1bd8ed83cf59a174283862
"café"UTF-863 61 66 C3 A9850f7dc43910ff890f8879c0ed26fe697c93a067ad93a7d50f466a7028a9bf4e
"café"Windows-125263 61 66 E9dafd66c0b98965e688be1fc12942c09f0350e6be0685017c3f234e97d0adc92e
  • Empty text has a digest too: pressing “Hash text” with nothing typed gives e3b0c442…, the standard result for zero bytes.
  • “hello” with a trailing line feed (LF) or a Windows line ending (CRLF) produces a completely different digest, and so does an invisible byte order mark at the start. When two texts look identical but their digests differ, this is usually the reason.
  • A browser text box normalises line breaks to LF (the HTML standard defines a textarea’s value that way). The Text box can therefore never produce the CRLF digest; to check a text file created on Windows, hash the file instead.
  • “café” saved as UTF-8 and as Windows-1252 differs in one byte, and the digests have nothing in common. The text box always uses UTF-8; hash files in other encodings with “Hash file”.
  • Digests are shown as 64 lowercase hex digits. PowerShell’s Get-FileHash also defaults to SHA-256 but prints uppercase; its documented “Hello world” string example, 64EC88CA…, matches the table above. Letter case does not matter when comparing.

How the expected digest is compared

Paste the publisher’s value into “Expected digest (optional)” and, after hashing, the status line says “Digest matches.” or “Digest does not match.”. The rule: surrounding whitespace is trimmed, the value must be exactly 64 hex digits, and the comparison ignores case. With the digest of “abc”:

What you pasteResult
The 64-digit digest in lowercaseDigest matches.
The same digest in uppercase (as Get-FileHash prints it)Digest matches.
With spaces or a line break around itDigest matches.
With a “sha256:” prefixExpected digest must be 64 hexadecimal characters.
A whole “digest report.pdf” lineExpected digest must be 64 hexadecimal characters.
One digit missed when copying (63 digits)Expected digest must be 64 hexadecimal characters.
The digest of a different fileDigest does not match.
  • A malformed value is reported as “Expected digest must be 64 hexadecimal characters.” before the file is even read, so no time is wasted hashing.
  • Checksum files often contain lines of the form “digest, two spaces, file name”, or a “sha256:” prefix. Copy only the 64-digit digest.
  • Changing the text, the file or the expected value clears the old result and shows “Input or options changed. Calculate again.”, so an old digest is never compared with a new file.

File size, memory and requirements

  • Files are limited to 100 MB, i.e. 104,857,600 bytes; larger files give “File limit: 100 MB.”. The whole file is read into browser memory before hashing (no chunked streaming), so a large file needs that much free memory.
  • Text is limited by its UTF-8 size: 10,485,760 bytes. Chinese text, at 3 bytes per character, fits about 3,495,253 characters and beyond that gives “Text limit: 10 MB.”; plain ASCII text over the limit trips a character-count check first, with a message about characters instead.
  • Only SHA-256 is offered: no MD5, SHA-1 or SHA-512. If a publisher lists only another algorithm, this tool cannot check it.
  • Hashing uses the browser’s built-in Web Crypto (crypto.subtle), which requires an HTTPS page; without it you see “Web Crypto is unavailable; use HTTPS.”. Neither files nor text are uploaded.
  • If you have typed text and chosen a file, the button you press decides which one is hashed. “Hash file” without a file gives “Choose a file first.”

Checking a download against its published checksum

  1. Find the SHA-256 value for the exact file name and version on the publisher’s download page or release notes.
  2. Choose the downloaded file here, paste the published value into “Expected digest (optional)” and press “Hash file”.
  3. “Digest matches.” means your file is byte-for-byte the file the publisher hashed: the download is neither damaged nor swapped.
  4. On a mismatch, download again; if it still does not match, do not open or install the file.
  • If the checksum and the file come from the same tampered page, both may have been replaced, so take the checksum from a separate channel such as the official site or signed release notes.
  • A digest is not encryption: it cannot be reversed to recover content, and it does not stop anyone from reading the file. Use encryption when the content must stay private.

Sources

Frequently asked questions

Is my file uploaded?

No. Hashing runs locally in your browser.

Size limits?

Text up to 10 MB and files up to 100 MB; files are read fully into browser memory.

Can it compute MD5?

This tool computes SHA-256, which is more secure than MD5 and widely used for verification.