SHA-256 Text Hash

Calculate a SHA-256 hash from UTF-8 text in your browser. Learn how whitespace changes a digest and why a hash is not encryption or password storage.

How to hash text

  1. Enter the exact text you want to hash, including intentional spaces and line breaks.
  2. Select Calculate SHA-256.
  3. Copy the 64-character hexadecimal digest.

A known example

The text abc, with no trailing newline, produces:

ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Changing a letter, adding a space, or adding a newline produces a different digest. Empty text is also a valid input to SHA-256; the tool hashes it rather than treating it as an error.

Encoding and exact input

The tool encodes the text as UTF-8 with TextEncoder, then calls the browser’s SHA-256 implementation. It does not trim input or normalize Unicode. Visually similar text can use different character sequences, which can produce different hashes.

A browser textarea normalizes line endings. This is a text hash tool, not a file-byte checksum utility. Do not use it to verify a downloaded binary or a file whose exact line-ending bytes must be preserved.

What a hash does not provide

Hashing is not encryption: there is no decryption button or secret key. A digest alone does not authenticate its source. Plain SHA-256 is not a suitable password-storage scheme; use a purpose-built password-hashing system for that application.

Frequently asked questions

Can I calculate SHA-1 or MD5?

This tool deliberately supports SHA-256 only.

Does it work offline?

Once loaded, the calculation runs locally, but the browser must support Web Crypto in a secure context such as HTTPS or localhost. No hash service is called.

Where can I read about the implementation?

See the official MDN digest documentation for the browser API used here.

Browse all tools · Report an issue