SHA-256 Hash Generator
Generate the SHA-256 hash of any text instantly in your browser. UTF-8, hex or Base64 input; hex or Base64 output. Free, private, no upload.
Runs entirely in your browser. Your data is never uploaded.
What is SHA-256 Hash Generator?
SHA-256 is the most widely used member of the SHA-2 family and produces a 256-bit (64 hex character) digest. It secures TLS certificates, software downloads, Bitcoin and countless APIs. This tool computes the 256-bit SHA-256 digest of text or raw bytes (hex or Base64) as you type and shows it as 64 hex characters or Base64.
How to use SHA-256 Hash Generator
- Type or paste your input into Text to hash — the digest updates as you type (an empty box shows the hash of empty input).
- Choose the Input encoding: Text (UTF-8) hashes the characters as UTF-8, Hex bytes or Base64 hash the decoded raw bytes.
- Pick the Output format (hex lowercase, hex uppercase or Base64) and click Copy.
Example
abc
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
SHA-256 of the 3 ASCII bytes "abc" (UTF-8, hex lowercase output), the standard test vector.
When to use SHA-256 Hash Generator
Use the SHA-256 text tool to hash strings: reproduce a value from documentation or code, build test vectors, compare an API signature input, or check what a program should output. Do not use it to check a downloaded file: copying file contents into a text box changes line endings and encoding, so use the SHA-256 file checksum tool. For password storage use a dedicated password hash; for keyed integrity use HMAC-SHA256.
How SHA-256 Hash Generator works
SHA-256 pads the message with a 1 bit, zeros and the 64-bit big-endian bit length to a multiple of 512 bits. Each block is expanded into 64 words and mixed into eight 32-bit state words over 64 rounds using the Σ0, Σ1, Ch and Maj functions and 64 constants derived from the cube roots of the first primes. The final eight words are the digest. The text is first converted to bytes (UTF-8 by default), so the same characters always give the same hash.
Common Use Cases
- Check the expected SHA-256 of a string in a unit test or fixture
- Hash hex bytes copied from a debugger, packet capture or protocol spec
- Compare SHA-256 output between two programming languages that disagree
- Generate deterministic identifiers or cache keys from text
- Get the Base64 form of a SHA-256 digest for headers or configuration files
Security Note
SHA-256 has no known practical attacks. Plain hashes are also not suitable for storing passwords: use a slow, salted password hash such as Argon2, scrypt or bcrypt. Everything is computed locally in your browser; nothing you type is sent anywhere.
FAQs
Is SHA-256 secure?
Yes. No practical collision or preimage attacks are known; finding a collision would still take about 2^128 work. It is approved by NIST and used across TLS, code signing and blockchains.
Why is the SHA-256 of my file different from the one on this text page?
Text is hashed as its UTF-8 bytes, so a missing trailing newline or CRLF line endings change the result. To check a downloaded file, use the SHA-256 file checksum tool, which hashes the exact file bytes.
Why does the hash change completely when I change one character?
That is the avalanche effect every cryptographic hash is designed for: flipping one input bit changes about half of the 256 output bits, so similar inputs give unrelated digests.
Does a trailing space or newline matter?
Yes. The hash covers every byte, so abc and abc followed by a newline give different SHA-256 values. Make sure the input contains exactly the bytes you intend to hash.