What is a Hash Generator?
A cryptographic hash takes any amount of input and returns a fixed-length fingerprint. This tool computes four of them — SHA-1, SHA-256, SHA-384 and SHA-512 — from the text you paste, using the Web Crypto API built into the browser.
Three properties matter in practice. The output length is fixed regardless of input size, so a 40-character digest covers a one-word message and a novel equally. The function is one-way: there is no inverse, and the only way back is guessing inputs until one matches. And it is deterministic, so the same bytes always produce the same digest — which is what makes hashes useful for integrity checks and content addressing.
The difference between the algorithms is output size and age. SHA-1 produces 160 bits and is broken for collision resistance: in 2017 the SHAttered attack produced two different PDFs with the same SHA-1 digest. SHA-256 and SHA-512 belong to the SHA-2 family and are still sound. Longer output is not automatically “more secure” for ordinary use — SHA-256 is the sensible default, and SHA-512 is faster on 64-bit hardware.
How to hash a piece of text
- Paste or type the text into the box. The byte counter shows exactly what will be hashed.
- Press Generate hashes. All four digests are computed at once, in the browser.
- Compare against a known value digit by digit — a single different character changes the entire digest.
- Use Copy next to the algorithm you need. The value is lowercase hex, the usual form for checksums.
- If the digest does not match, check for a trailing newline or a different character encoding before suspecting the file.
Hash Generator limits and rules
| Item | Limit |
|---|---|
| Algorithms | SHA-1, SHA-256, SHA-384, SHA-512 |
| Output form | Lowercase hexadecimal — 40, 64, 96 and 128 characters |
| Input encoding | UTF-8 bytes of the text as typed |
| Trailing newline | Significant — a newline at the end changes every digest |
| MD5 | Not offered; it is broken for any security purpose |
| HMAC | Not offered — this hashes the message alone, with no key |
| Files | Text only; paste file contents or use a checksum utility for large binaries |
| Password storage | Unsuitable — these are fast hashes, not password hashes |
When to use it
- Checking that a value you received matches one you expected, such as a webhook signature payload or a cached ETag.
- Generating a stable identifier for a piece of text — a cache key, a deduplication key, a deterministic filename.
- Verifying that a configuration file was copied without edits: hash it before and after.
- Producing test fixtures for code that verifies SHA-256 digests.
- Confirming the classic property that changing one character changes everything, which is useful when teaching or debugging.
Is it private?
Everything runs inside your browser. Your text and files are never uploaded, never stored and never seen by anyone else — including me. You can use the tool with the network tab open and watch no request leave the page. Closing the tab erases the input.
Frequently asked questions
No. A hash throws information away by design, so there is no inverse function. What attackers do instead is guess: hash a list of likely inputs and look for a match. That is why a hash of a common password is easy to “crack” while a hash of a long random string is not.
Not for anything where two different inputs must not share a digest. The SHAttered attack built two PDFs with the same SHA-1 hash, and cheaper variants exist. It is still fine as a non-adversarial checksum, which is the only reason it is offered here — use SHA-256 for new work.
No. A fast hash is exactly wrong for passwords: an attacker can try billions of candidates a second on a GPU. Use a password hash that is deliberately slow and salted — Argon2id, scrypt or bcrypt — and let a library handle it. Nothing on this page is a substitute.
Because the input is not the same bytes. A text area hashes what you paste: if the original file ended with a newline and your paste did not, the digest changes. Encoding matters too — UTF-8 with a byte-order mark hashes differently from UTF-8 without one.
Encryption is reversible with a key; hashing is not reversible at all. Encryption protects data you need to read again. Hashing verifies data without storing it — you keep the digest, not the message.
No. The browser's `crypto.subtle.digest` runs locally in the page. The digest is computed from bytes already in memory, so the input never touches the network — which matters when the text is a secret.
Related tools
Written and maintained by Md. Nur Hossain Repon.