This hash generator computes the SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text at the same time, in lowercase or uppercase hex. Use it to check a checksum, compare two values without revealing them, or test your own hashing code. Hashing runs in your browser using its built-in Web Crypto API, so your text is not sent anywhere.
How to use the hash generator
- Type or paste into the Text to hash box.
- All four hashes update as you type.
- Tick Uppercase hex if the system you are comparing against shows capital letters.
- Click Copy next to the hash you need.
Every character counts, including spaces and line breaks. A trailing newline that you cannot see will give a completely different hash, so check for one if your result does not match.
How it works
A cryptographic hash function turns input of any length into a fixed-length fingerprint. The same input always gives the same output, but changing a single character changes the result completely, and there is no practical way to work backwards from the hash to the input.
The tool first converts your text to UTF-8 bytes, the same encoding used by most programming languages and command-line tools. It then passes those bytes to crypto.subtle.digest for each algorithm and shows the result as hexadecimal. Browsers only provide Web Crypto on secure (HTTPS) pages, which this site uses. If your browser blocks it, the tool shows a message instead of results.
Hashing is not encryption. Encryption can be reversed with a key, while a hash cannot be reversed at all. Also, a plain hash is not a safe way to store passwords; use a slow, salted algorithm such as bcrypt or Argon2 for that.
Example
The hashes of the text hello world (no trailing newline) are:
SHA-1 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed
SHA-256 b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
SHA-384 fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd
SHA-512 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f
You can confirm the SHA-256 value on macOS or Linux with:
printf 'hello world' | shasum -a 256
Using echo instead of printf adds a newline and gives a different hash.
Which algorithm to choose
| Algorithm | Output length | Status |
|---|---|---|
| SHA-1 | 160 bits (40 hex) | Broken for security; only for legacy checksums and Git object IDs |
| SHA-256 | 256 bits (64 hex) | The common default for checksums, signatures and blockchains |
| SHA-384 | 384 bits (96 hex) | Used in TLS and subresource integrity |
| SHA-512 | 512 bits (128 hex) | Longest output; often faster than SHA-256 on 64-bit CPUs |
MD5 is not offered because browsers do not include it in Web Crypto, and it has been broken for many years. To share binary data as text instead of fingerprinting it, try our Base64 encoder.
A common use is checking a published checksum. If a project lists the SHA-256 of a config snippet or a short release note, paste the exact text here and compare the two values. They must match character for character; a mismatch means the text differs somewhere, even if it looks the same.
Frequently asked questions
Can a hash be decrypted back to the original text?
No. A hash is one-way. Short or common inputs can be guessed by trying many candidates, which is why hashes of simple passwords are not secret.
Why does my hash not match another tool?
The input bytes differ. Look for a trailing newline, extra spaces, different line endings (Windows uses CRLF) or a different text encoding.
Is SHA-1 still safe to use?
Not for security. Researchers have produced SHA-1 collisions, so use SHA-256 or stronger for signatures and integrity checks.
Can I hash a file with this tool?
No. This tool hashes text only. To check a downloaded file, use shasum on macOS or Linux, or certutil on Windows.
Is my text sent to a server?
No. The hashes are computed by your browser and the text stays on your device.
