SHA-256 hash generator
SHA-256 turns any input into a fixed 256-bit fingerprint, written as 64 hexadecimal characters, and changing a single character changes the whole hash. Type or paste text to hash it in your browser with the Web Crypto API, as hex or Base64.
SHA-256 hash (hex)
d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592
- Algorithm
- SHA-256
- Input size
- 43 bytes (UTF-8)43 characters
- Hash length
- 256 bits (32 bytes)64 hex characters
How is a SHA-256 hash calculated?
The text is first turned into bytes with UTF-8, the only encoding the browser's TextEncoder uses, so “abc” is 3 bytes and “é” is 2. FIPS 180-4 then pads those bytes to a whole number of 512-bit blocks and runs each block through 64 rounds of 32-bit operations. The result is always 256 bits: 32 bytes, written as 64 hexadecimal characters or 44 Base64 characters.
SHA-384 and SHA-512 use 1,024-bit blocks, 64-bit words and 80 rounds; SHA-384 is SHA-512 started from different initial values and cut to its first 384 bits. SHA-1 gives 160 bits, but a practical collision was published in 2017 and NIST has said to phase it out by 31 December 2030, so it is here only to match old checksums.
The hash is worked out on this page by the Web Crypto API's crypto.subtle.digest, which browsers offer only on secure (https) pages, so your text is not sent anywhere. The same input always gives the same hash, and FIPS 180-4 calls these functions secure because finding an input for a given hash, or two inputs with the same hash, is computationally infeasible.
bytes = UTF-8(text) hash = SHA-256(bytes) → 256 bits = 32 bytes hex: 2 characters per byte → 64 characters Base64: 4 characters per 3 bytes → 44 characters
What is the SHA-256 hash of an empty string?
| Input | Algorithm | Hash (hex) |
|---|---|---|
| (empty string) | SHA-256 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 |
| “abc” | SHA-256 | ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad |
| “abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq” | SHA-256 | 248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1 |
| (empty string) | SHA-384 | 38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b |
| “abc” | SHA-384 | cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7 |
| (empty string) | SHA-512 | cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e |
| “abc” | SHA-512 | ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f |
| (empty string) | SHA-1 | da39a3ee5e6b4b0d3255bfef95601890afd80709 |
| “abc” | SHA-1 | a9993e364706816aba3e25717850c26c9cd0d89d |
How to generate a SHA-256 hash
- 1Enter your textType or paste up to 1,000,000 characters. Every character counts, including spaces and line breaks.
- 2Choose the algorithmSHA-256 is the default. Pick SHA-384 or SHA-512 for a longer hash, or SHA-1 only to match an old checksum.
- 3Choose how to show the hashPick lowercase hex, uppercase hex or Base64 to match the tool or file you are comparing with.
- 4Copy the hashCopy it from the result, which updates as you type, along with the input's size in bytes.
Frequently asked questions
Can a SHA-256 hash be reversed to get the original text?
Is SHA-256 safe for storing passwords?
Why doesn't my SHA-256 hash match the one from sha256sum?
Is SHA-1 still safe to use?
What is the difference between SHA-256, SHA-384 and SHA-512?
Sources
- NIST FIPS 180-4, Secure Hash Standard (block and word sizes, rounds, SHA-384 truncation) (checked 20 Oct 2026)
- NIST CSRC, Examples with intermediate values for SHA-1, SHA-256, SHA-384 and SHA-512 (checked 20 Oct 2026)
- MDN, SubtleCrypto: digest() (algorithms, secure contexts only) (checked 20 Oct 2026)
- MDN, TextEncoder (always UTF-8) (checked 20 Oct 2026)
- OWASP Password Storage Cheat Sheet (checked 20 Oct 2026)
- NIST, NIST Retires SHA-1 Cryptographic Algorithm (15 December 2022) (checked 20 Oct 2026)
- SHAttered, the first practical SHA-1 collision (CWI Amsterdam and Google, 2017) (checked 20 Oct 2026)
- echo(1), Linux manual page (-n: no trailing newline) (checked 20 Oct 2026)
Need a custom dev tool for your team?
We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.
Built by CountryDevs · No signup · No ads · We count visits, never what you enter