SHA-256 Hash Calculator

Calculate SHA-256 for text or files locally, then compare the result with an expected hash.

How to use

  1. Choose UTF-8 text or a file’s original bytes.
  2. Provide the input and calculate SHA-256.
  3. Review the 64 hexadecimal digits and optionally compare an expected hash.

Input to hash

Up to 2 MB in UTF-8. Empty text can be hashed. Spaces and line breaks in this field are included.

SHA-256 result and comparison

Copy contains only the 64-digit value. TXT adds one final newline (LF) to that same value.

Paste only the 64-digit value from a trusted source. Letter case and surrounding whitespace are ignored.

Hash abc and compare a known value

In text mode, abc hashes 3 bytes and produces the following 64-digit value. The example button also checks it against this known value.

Example: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Adding a newline after abc changes the hash. Text is encoded as UTF-8 without an added BOM; browser text fields use LF line breaks. File mode uses the original bytes, including line endings and any BOM, so visually identical text may hash differently.

File names are not hashed. Identical bytes give the same hash even after renaming. SHA-256 is not encryption. A matching hash alone does not establish file safety or authenticate its source.

Try a use case and check the result

Check that abc with and without a trailing LF produces different hashes.

Example buttons replace the inputs and settings above and calculate. Restore previous input steps back one example at a time. After trying multiple examples, repeat restore to return to your original input. This history is lost when the page closes.

Hash abc without a newline: three bytes

Input and settings

Text: abc / No trailing newline / Expected value in uppercase HEX

Expected result

ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
Comparison matches

Append one LF after abc

Input and settings

Text: abc plus LF / Four bytes / Expected value from the first example

Expected result

edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb
Comparison mismatches

How to read the result

SHA-256 hashes bytes rather than visual appearance. Newlines and BOM count. Expected values allow surrounding whitespace and either hex case, but must contain only the 64-digit hash, not a checksum line with a filename.

Scope and limits

Text is limited to 2 MB in UTF-8 and files to 50 MB. Textarea newlines normalize in the browser; use file mode to check original bytes. Web Crypto is required. A matching hash alone does not establish origin or safety. Restore returns mode, text, expected hash and original file; calculate again.

Verification: an independent Node SHA-256 implementation and known abc vector check three versus four bytes. Browser checks compare original file bytes, mode/hidden text, recalculation after restore and late results from pending work.

Continue with the next task

Frequently asked questions

Are files uploaded?

No. Text, file names, file bytes, results and expected hashes stay in the browser and are not autosaved. Copying and TXT saving happen only when selected.

Can I hash large files?

The limit is 50 MB. This is not streaming: the entire file is loaded into memory. If the device cannot process it, use a dedicated local tool.

Does this support MD5, SHA-1 or password storage?

Only SHA-256 is supported. This is not a password-storage or verification system. It uses the standard crypto.subtle.digest API and requires a supported browser on HTTPS.

Related tools

Inputs and storage

Keep any content you need before clearing. This tool does not autosave inputs or results. Reloading or closing the page, clearing inputs or resetting may discard your work.

Favorites and language preferences are stored separately and may be lost when site data is cleared. Tool resets and site-data deletion do not delete files already downloaded to your device.

Explore tools & games

All 120 tools · 16 games

All 120 tools · 16 games

Text & writing 26

Calculators & converters 22

Date & time 12

Images & PDF 26

Data & web 28

Random & handy 6

Games 16