SHA-256 Hash Generator
Compute the SHA-256 digest of text or a file — hex and Base64, entirely on this device.
The SHA-256 digest appears here as you type.
Press ? for shortcuts
Do it offline:$ printf '%s' 'hello' | sha256sum
How to use it
- Type or paste the input. Hashing runs automatically — there is no submit button to press.
- Choose how the input is read: text (UTF-8 bytes as typed), hex or Base64. The selector never switches on its own.
- Copy from the hex row or the Base64 row. The case toggle restyles the hex on screen, and copy takes exactly the case shown.
- For a file, drop it or use the picker, then paste the published digest into the compare field for a match verdict.
SHA-256 is the digest that download pages and container registries publish today — the modern default where MD5 and SHA-1 have been retired. Paste text and the hash appears as you type: 64 hex characters plus the Base64 form, computed on this device by your browser's Web Crypto engine. Switch the interpretation to hex or Base64 when the input is raw bytes, or drop a file up to 64 MB to verify a download.
Examples
hello2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824Five UTF-8 bytes in, 32 bytes out, printed as 64 lowercase hex digits. The same digest in Base64 is LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ= — the shorter form some checksum headers expect.
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855Hashing zero bytes is legal, and every implementation agrees on this value — it is the SHA-256 of nothing. Worth recognizing on sight: e3b0c442 in a build log usually means a step produced an empty file.
68656c6c6f2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824Read as hex, these ten characters decode to the same five bytes as typing hello in text mode, so the digest matches example 1 exactly — the hash sees bytes, never the characters spelling them.
hello
5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03One invisible byte, a completely different digest. echo appends a newline before hashing and printf '%s' does not — a note flags it when your text ends this way.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
Files over 8 MB stream in 4 MB chunks
Up to 8 MB, a file is hashed in one Web Crypto call. Above that, the tool switches to an incremental WebAssembly hasher and feeds it 4 MB slices, so memory stays flat and the progress bar stays honest. Both paths print the identical digest.
The 64 MB inline limit refuses — it never truncates
Hashing part of a file would print a digest that matches nothing, so past 64 MB this page declines outright and the refusal names the File Checksum Verifier instead.
Unicode is hashed exactly as typed
café with a precomposed é and café typed as e plus a combining accent are different byte sequences, so their digests differ. The tool never normalizes to NFC or NFD — the byte difference is real and usually explains cross-system mismatches over the same visible string.
Null bytes and binary input travel as hex
A text box cannot reliably hold a NUL byte, but the hex interpretation reaches every value: 00 hashes the single zero byte, deadbeef hashes those four bytes. Base64 works the same for data already in that form.
Share links carry the digest, not your input
The default share encodes only the computed digest and display settings, so the recipient sees the result with an empty input field. Attaching the input is a separate, explicit choice, because hash inputs are so often secrets.
The compare field forgives formatting, not typos
An expected digest pasted with surrounding whitespace or uppercase hex still compares, and a note says what was normalized. A non-hex character is pointed at by position and a wrong length is called out — a paste error reads as an error, never as a mismatch.
Common errors
`h` at position 1 is not a hex digit- Plain text was pasted while the interpretation was set to hex, so the very first character fails — hex mode reads only 0–9 and a–f in pairs. Switch back to text to hash the characters themselves.
Invalid Base64: character '.' at position 8- Dots separate the segments of a JWT; they are never Base64. Hash one segment at a time, or hash the whole token as text if the token itself is what you mean to fingerprint.
This doesn't look like a SHA-256 digest (unexpected length 40) — a SHA-256 digest is exactly 64 hex characters.- A 40-digit checksum is SHA-1 and a 32-digit one is MD5. The published value you pasted came from a different algorithm, so no SHA-256 output could ever equal it — rehash with the matching tool instead.
FAQ
SHA-256 vs MD5 — which should I use?
SHA-256, unless a legacy system leaves you no choice. MD5 collisions are practical to manufacture, so it cannot prove integrity against tampering. SHA-256 has no publicly known collision and is the algorithm FIPS 180-4 standardizes for exactly this job.
Can a SHA-256 hash be reversed?
No. A digest is a 32-byte fingerprint, not a container — the input is not inside it waiting to be extracted. Lookup sites that appear to reverse hashes are guessing: they hash enormous lists of candidate strings and report any match — which only works for guessable inputs.
Why is my digest different from my terminal's?
Almost always the newline: echo appends one before hashing — that is why example 4 differs from example 1 — while printf '%s' matches this page. Otherwise it is the interpretation: hashing the characters 68656c6c6f as text is not hashing the five bytes they spell in hex mode.
Keyboard shortcuts
- ⌘/Ctrl + Enter
- Re-run the hash now.
- ⌘/Ctrl + S
- Download — the hex digest as .txt in text mode, a sha256sum-format line in file mode.
- ⌘/Ctrl + C
- Copy the hex digest, in the displayed case, when nothing is selected.
- ⌘/Ctrl + Shift + C
- Copy the hex digest even while a selection exists.
- t
- Cycle the theme.
- ? or ⌘/Ctrl + /
- Show the shortcut help overlay.
- Esc
- Close the topmost overlay.