Generate a SHA-256 digest from text using the Web Crypto API.
What SHA-256 does
SHA-256 maps input bytes to a 256-bit digest. The same input produces the same digest.
A plain SHA-256 digest is not a purpose-built password hashing scheme. Password storage typically requires a dedicated, salted, computationally expensive password-hashing approach.
How to hash text
- Enter the exact text, including any spaces and line breaks you want included.
- Select Generate SHA-256. The tool encodes the textarea value as UTF-8 and returns 64 lowercase hexadecimal characters.
- Use Copy Hash or select the digest manually. Editing the text clears the old digest; Reset restores the example text and clears the output.
Check a known example
The text abc, without a trailing newline, produces:
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
Why two hashes may differ
Case, spaces and line breaks are part of the input. abc and abc followed by a newline have different bytes. Visually identical Unicode text can also have different encodings; this tool does not normalize Unicode or trim text. A blank input is valid and hashes the empty byte sequence.
The limit is 200,000 UTF-16 code units in the input box, not a file-size limit. This is a text tool: it does not hash uploaded files, decode hexadecimal input into bytes, generate SHA-224 or compute a keyed HMAC.
Browser requirements
The calculation uses Web Crypto digest with TextEncoder UTF-8 encoding. Use HTTPS in a browser that supports these APIs. If copying is blocked, the digest is selected for manual copying.