How to generate a text hash
- Paste the exact text whose UTF-8 representation you want to hash.
- Select SHA-256, SHA-384 or SHA-512.
- Select Calculate hash and review the algorithm and input-byte count.
- Copy the lowercase hexadecimal digest or download it as a text file.
An empty input is valid and has a defined digest. If you expected a document but see zero input bytes, check that the text was actually pasted before using the result.
From text to a SHA-2 digest
The tool encodes the text with TextEncoder and passes those UTF-8 bytes to the browser’s Web Crypto digest API. It does not trim whitespace, normalize accents, alter letter case or add a final newline. A different byte sequence can produce a different digest even when two strings look similar.
SHA-256 produces 256 bits, shown as 64 hexadecimal characters. SHA-384 produces 96 hexadecimal characters, and SHA-512 produces 128. Hexadecimal is just the display notation for digest bytes; it does not add encryption or a secret key.
Web Crypto requires a supported HTTPS context or localhost. An unavailable API produces an explicit error. No JavaScript imitation or external hashing service is used as a fallback.
SHA-256 example
Input
abc
Result
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
The input is exactly three UTF-8 bytes, without quotes or a newline. Adding a space after c changes the input and its digest. When comparing with a command-line utility, verify whether the command included a terminating newline and which text encoding it used.
Unicode and copied-text differences
A precomposed accented letter and a base letter plus a combining accent can look identical while producing different UTF-8 bytes. This tool preserves that distinction. Unpaired Unicode surrogates are rejected rather than silently hashing replacement characters. The browser textarea can normalize pasted line endings, so this is a hash of the text in the field, not a byte-for-byte file checksum.
Use the character counter to understand graphemes versus code points, and Text Diff to inspect textual differences. Cleaning whitespace before hashing intentionally changes the input; only do so if your protocol specifies that transformation.
What a hash can and cannot establish
A digest can help compare exact content when the expected digest comes from a trusted source. It does not by itself authenticate the sender, encrypt a message or prove that a downloaded file is harmless. This tool accepts text, not binary files, and does not provide HMAC, digital signatures or a checksum database.
Plain SHA-2 is not a password-storage scheme. Password storage needs a suitable salted, work-factor-based design in the application. No MD5 or SHA-1 mode is included. The 1 MiB text limit also avoids implying that the browser is streaming arbitrary large files through this interface.
For a reversible text representation, use Base64; Base64 is not encryption either. For a newly generated identifier rather than a content fingerprint, use the UUID Generator.
What a SHA digest proves
A digest is a fixed-length fingerprint of the exact input bytes. Change one character and the output changes unpredictably; the same bytes always produce the same digest. That makes hashes useful for integrity checks: compare the full digest after a download, a copy or a build.
A digest does not prove who created the bytes. Anyone can compute a SHA-256 value, so a matching hash only shows that two inputs are identical. SHA-256, SHA-384 and SHA-512 differ in output length and internal design; the choice should follow the format or protocol that will verify the value.
Hash the bytes you actually intend to hash
Text is encoded as UTF-8 before hashing. A trailing space, a final newline, CRLF instead of LF, or a different Unicode normalization turns the input into different bytes and produces a different digest. When comparing with a published checksum, confirm how the file was transferred and whether the reference was computed over the file or over its text.
Fast general-purpose hashes are unsuitable for storing passwords; use a dedicated password KDF such as Argon2, scrypt or bcrypt. Use Base64 when you need a reversible representation rather than a fingerprint.
Processing and privacy
SHA Hash Generator computes the digest in the page with Web Crypto; the hashed text is not uploaded. Input stays in browser memory until you reset or leave the page. Copy and download run only when you choose them. No tool input is sent to a processing service. Website pages and scripts still make ordinary hosting requests; the privacy policy separates those from tool processing.
Frequently asked questions
Can I reverse a SHA hash to retrieve the original text?
This tool has no reversal operation. Hashing is not reversible encoding or encryption.
Why does my command-line hash differ?
Check encoding, leading/trailing spaces, line endings and whether the command added a newline. This tool hashes the exact textarea text as UTF-8.
Can I use this as a file checksum tool?
No. Pasting text can change its representation. This page hashes text, not the original bytes of an uploaded binary file.
Can I use SHA-256 to store passwords?
No. A fast general-purpose hash is easy to brute-force at scale; use a memory-hard password KDF with a per-user salt.
Why does another tool produce a different digest?
Different bytes or a different algorithm. Check line endings, trailing whitespace, encoding and whether both tools used SHA-256, SHA-384 or SHA-512.
How this tool was checked
SHA Hash Generator was checked with empty input, multi-byte UTF-8, trailing spaces, exact newlines and known SHA-256, SHA-384 and SHA-512 digests. See the testing method or report a failure.