Hash generator
Compute a cryptographic hash (digest) of any text using the SHA-256, SHA-1 or SHA-512 algorithms. The same input always yields the same output, while even a tiny change transforms it completely. The hash is calculated right in your browser via the Web Crypto API — your text never leaves your device.
How the hash generator works
A hash function takes an input of any length and produces a fixed-length fingerprint — the hash or digest. The tool supports three standard algorithms from the SHA (Secure Hash Algorithm) family:
- SHA-256 — 256 bits, a 64-character hexadecimal output. Today's standard, used in TLS certificates, Bitcoin and file verification.
- SHA-1 — 160 bits, 40 characters. Historically widespread but cryptographically broken (collisions exist). Suitable only for non-critical checksums, not for security.
- SHA-512 — 512 bits, 128 characters. A stronger variant built on the same principle as SHA-256.
Key properties of a hash: it is deterministic (same text = same digest), one-way (the input cannot practically be recovered from the digest) and change-sensitive (a single altered character changes the whole output — the avalanche effect). Text is encoded to UTF-8 before hashing, so accents and emoji work correctly.
Important: a hash is not encryption. Encrypted data can be decrypted back with a key, whereas a hash is irreversible and serves to verify, not to conceal content.
How to use the hash generator
- Paste the text you want to hash into the field.
- Choose an algorithm (SHA-256 is the default).
- The digest is computed instantly and shown as a hexadecimal string.
- Select and copy the digest for further use.
Example — the same input, different algorithms:
| Input | Algorithm | Output (hex) |
|---|---|---|
| abc | SHA-1 | a9993e364706816aba3e25717850c26c9cd0d89d |
| abc | SHA-256 | ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad |
Notice how the output differs completely even though the input is identical — each algorithm produces a distinct digest of a distinct length.
What the hash generator is good for
- Verifying file integrity — comparing hashes tells you whether data was corrupted or altered in transit (a checksum).
- Checking that texts match — instead of comparing long strings, just compare their digests.
- Development and testing — quickly generate digests for API signatures, cache keys or identifiers.
- Learning cryptography — a vivid demonstration of the avalanche effect and the differences between algorithms.
Because the calculation runs entirely locally in the browser, you can safely hash even sensitive text — nothing is sent to a server. Be careful when hashing passwords, though: a bare SHA digest (without a salt and without a slow function like bcrypt or Argon2) is not safe for storing passwords. To gauge real password strength, use the Password strength tool.
FAQ
What is the difference between SHA-256 and SHA-512?
Both belong to the SHA-2 family and are considered secure. SHA-512 produces a longer, 512-bit digest (128 characters) versus 256 bits for SHA-256 (64 characters) and can be somewhat faster on 64-bit systems. For most uses SHA-256 is more than sufficient.
Can I get the original text back from a hash?
No. Hash functions are one-way — the input cannot practically be derived from the digest. Apparent "decoding" of a hash only works by hashing many guesses and looking for a match (a dictionary attack), which fails for a long, random input.
Is a hash the same as encryption?
No. Encryption is reversible — with a key you decrypt the data back. A hash is irreversible and serves to verify integrity or compare data, not to conceal content that could later be restored.
Why shouldn't I use SHA-1 for security?
SHA-1 is cryptographically broken — collisions are known, meaning two different inputs share the same digest. It is not used for digital signatures or security purposes. As a non-critical checksum for legacy data it can still serve.
Does my text leave my computer?
No. The entire calculation runs in your browser via the Web Crypto API. Neither the text nor the resulting hash is sent to any server, so you can safely process sensitive data.
Does the tool work with accents and emoji?
Yes. Text is encoded to UTF-8 before hashing, so accented letters, special characters and emoji all produce a correct and consistent digest.
Can I hash passwords for a database with this?
Not recommended. A bare SHA digest has no salt and no slowdown, making it vulnerable to precomputed-table attacks. For storing passwords, use dedicated functions such as bcrypt, scrypt or Argon2.
Why does the same text always return the same hash?
Because hash functions are deterministic. This property is intentional — it lets you verify that data has not changed. As soon as you alter even a single character, the avalanche effect transforms the whole output.
Sources & standards
📅 Last updated: 11 July 2026