Generate SHA-256 digests
Compute the SHA-256 hash of any UTF-8 text. 256-bit, 64 hex characters. Hashing uses Web Crypto and runs entirely in your browser.
—
How to compute SHA-256: a complete step-by-step guide
SHA-256 is a member of the SHA-2 family standardized in FIPS 180-4 — a one-way cryptographic hash producing a 256-bit (32-byte) digest from arbitrary input. This tool feeds UTF-8 bytes to the browser's crypto.subtle.digest("SHA-256", bytes) Web Crypto API, then formats the result as 64 hex characters. Computation is entirely local — your input never touches a network socket.
- 01
Type or paste any UTF-8 text
Drop in plain text, JSON, a license key, a file manifest, a passphrase, or any string you need to fingerprint. We encode it with
TextEncoderfirst, so emoji, accents, CJK, and any Unicode character produces a stable, well-defined byte sequence before hashing.The same input always yields the same digest (deterministic) — change one bit and the entire digest changes (avalanche effect). For hashing whole files efficiently, the File Checksum Verifier streams data without loading it all in memory.
UTF-8TextEncoderFIPS 180-4deterministicavalancheinput · plain text1 linehello
5 B · 5 charsutf-8 · ready - 02
Choose lowercase or uppercase hex
The digest is 32 raw bytes; we display it as hex — two characters per byte = 64 characters total. Lowercase is the dominant convention (Git object IDs, OpenSSL, Linux
sha256sum); uppercase appears in some vendor checksums and Windows utilities.Case affects display only; the underlying bytes are identical. Toggle freely without re-hashing.
64 hex32 byteslowercaseuppercasedisplay onlyformat · caselowerlowercase · UPPERCASE
format setFIPS 180-4 § 6.2 - 03
Watch the live 256-bit digest
Every keystroke triggers a fresh
subtle.digestcall. The browser computes the hash on the main thread (sub-millisecond for typical inputs) and renders the 64-char hex output. No debounce, no submit, no roundtrip.Use the result for content addressing (Git, IPFS, Docker layers), Subresource Integrity (
integrity="sha256-…"), HMAC keys, ECDSA/RSA-PSS pre-image, or as a stable cache key.Web Cryptosubtle.digest256-bitSRIcontent-addressedoutput · sha-256 hex64 chars2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
32 B · 1 lineFIPS 180-4 · ready - 04
Copy, download, or combine with HMAC
One click copies the digest; download saves it as
.txt. Past that, SHA-256 rarely stands alone — pair it with the HMAC Generator for authenticated MACs, the JWT Encoder (which uses HMAC-SHA-256 underHS256), or the Bcrypt Generator when you need a deliberately slow password hash instead.Important: do not use raw SHA-256 for passwords. It's too fast — a GPU brute-forces billions of guesses per second. Use bcrypt, Argon2, or scrypt for credential storage.
clipboardHMACJWT HS256not for passwordsprivacy-firstexport · actions3 actions✓ Copied to clipboard ✓ Saved: sha256.txt ✓ 100% client-side
ready to ship0 outbound
Encoding without surprises
Always UTF-8 first
Use TextEncoder / TextDecoder for bytes ↔ string conversion. btoa alone breaks on non-ASCII.
URL-safe vs standard Base64
Standard uses +, /, =; URL-safe swaps to -, _, no padding. Don’t mix them.
Hashes aren’t passwords
SHA-256 is fast; that’s good for fingerprints, bad for passwords. Use bcrypt / argon2 for credentials.
Watch padding rules
Some decoders are strict about = padding, others auto-pad. If round-trips fail at exactly 1 or 2 bytes, check padding.
Use Web Crypto for keys
Generate cryptographic keys via crypto.subtle, never Math.random. The latter is predictable.
JWT decode ≠ verify
Decoding a JWT just splits and base64-decodes. Verification needs the issuer’s public key / shared secret.
When to use SHA-256
Integrity, signatures, content addressing.
File integrity
Compare a SHA-256 against a vendor checksum. Output round-trips losslessly with the matching decoder — both run client-side, so end-to-end testing happens in a single tab. Encoding flows through TextEncoder for predictable UTF-8 semantics.
RFC-compliantSubresource Integrity
Use a SHA-256 in an SRI hash attribute. Web Crypto's subtle.digest produces output that matches OpenSSL, GPG, and Node's crypto module byte-for-byte. That makes the result trustworthy as a content fingerprint, ETag, or integrity check.
OpenSSL-matchedDigital signatures
ECDSA and RSA-PSS commonly sign a SHA-256 digest. Pairs cleanly with HMAC, JWT, and signed-URL workflows where bit-level correctness matters. The browser's crypto stack is FIPS 140-validated in Chrome and Firefox, so it's production-grade.
losslessContent addressing
Identify blobs by hash in Git, IPFS, Docker. Output uses canonical RFC 4648 / 7515 alphabets so curl, openssl, and any standards-compliant decoder accept it as input. URL-safe variants drop padding for tokens that travel in query strings.
byte-identicalCache keys
Hash inputs to derive a deterministic cache key. Heavy hashing runs through useMemo so large inputs don't block typing. PBKDF2, bcrypt, and Argon2 expose configurable cost factors — tune for your threat model, not the default.
spec-gradeTest fixtures
Lock down expected output of a function. Same input plus same options always yields identical bytes. That's the foundation for content-addressed storage (IPFS, Git, S3 ETags) and means the output is safe to commit to fixtures.
production-readyFrequently asked questions
Something missing?
Tell us what you need. We ship the top requests every two weeks.