Hash Generator — MD5, SHA-1, SHA-256, SHA-384 & SHA-512
Compute cryptographic hashes of text or a file entirely in your browser. Large files are streamed, so nothing is uploaded and size is not limited by a server.
Hash Generator
SHA-1, SHA-256, SHA-384, and SHA-512 — computed locally in your browser.
—
—
—
—
Which algorithm, and whether it is still safe
"Broken" here means a collision can be produced deliberately — two different inputs with the same hash. It does not mean the hash can be reversed; none of these can be.
| Algorithm | Output | Status | Use for |
|---|---|---|---|
| MD5 | 128 bits / 32 hex | Broken — collisions in seconds on a laptop | Non-security checksums, cache keys, deduplication. Never signatures |
| SHA-1 | 160 bits / 40 hex | Broken — SHAttered (2017), chosen-prefix attacks since | Legacy compatibility only. Git uses it for addressing, not security |
| SHA-256 | 256 bits / 64 hex | Secure | The default choice: signatures, integrity, certificates, blockchains |
| SHA-384 | 384 bits / 96 hex | Secure | SHA-512 truncated; resists length-extension. Common in TLS suites |
| SHA-512 | 512 bits / 128 hex | Secure | Same family as SHA-256, often faster on 64-bit hardware |
SHA-3 and BLAKE2/BLAKE3 are also current and secure. They are not offered here because SubtleCrypto does not implement them natively, and a JavaScript implementation would be far slower on large files.
Do not hash passwords with these
This is the most consequential misuse of a general-purpose hash, and it is still common in production code.
SHA-256 is designed to be fast — that is the entire point for integrity checking, where you may hash gigabytes. Commodity GPU hardware computes tens of billions of SHA-256 hashes per second. Against a stolen password database, that speed belongs entirely to the attacker: a list of every breached password ever published can be tested against your whole user table in minutes.
Password storage needs a deliberately slow, memory-hard function with a per-user salt built in. The current choices are Argon2id (preferred for new systems), scrypt, bcrypt (still fine, widely available, but capped at 72 bytes of input), and PBKDF2 (acceptable where compliance requires it, with a high iteration count).
Adding a salt to SHA-256 yourself does not fix this. Salting defeats precomputed rainbow tables, which is worth having, but it does nothing about speed — the attacker simply computes per-user instead of using a lookup table, and at ten billion hashes a second that is barely an inconvenience.
What these hashes are genuinely good for
- Download verification —Hash a file you downloaded and compare it to the publisher’s stated checksum. This detects corruption reliably, and tampering as long as you obtained the checksum over a channel the attacker did not control.
- Deduplication —Identical content produces an identical hash, so hashing is how storage systems detect duplicate files without comparing them byte by byte.
- Content addressing —Git names every object by its hash; container registries and content-addressed stores do the same. The hash is the identifier.
- Cache keys and ETags —A hash of the content changes exactly when the content changes, which is precisely the property a cache key needs.
- HMAC signatures —Webhook signing uses HMAC-SHA256 — a keyed construction built on the hash. Note that HMAC is not the same as hashing the secret together with the body, and the difference is security-relevant.
Computing the same hashes in code
# macOS and Linux
shasum -a 256 file.iso
md5sum file.iso # Linux
md5 file.iso # macOS
# Windows PowerShell
Get-FileHash file.iso -Algorithm SHA256const data = new TextEncoder().encode('hello');
const digest = await crypto.subtle.digest('SHA-256', data);
const hex = [...new Uint8Array(digest)]
.map(b => b.toString(16).padStart(2, '0'))
.join('');import hashlib
h = hashlib.sha256()
with open('file.iso', 'rb') as f:
# Read in chunks so memory use stays flat
for chunk in iter(lambda: f.read(1024 * 1024), b''):
h.update(chunk)
print(h.hexdigest())# NOT hashlib. Use a password KDF.
from argon2 import PasswordHasher
ph = PasswordHasher()
stored = ph.hash("correct horse battery staple")
ph.verify(stored, "correct horse battery staple") # raises on mismatchAbout
The Hash Generator computes cryptographic hash digests (SHA-1, SHA-256, SHA-384, SHA-512) from any text string or file using the browser's Web Crypto API. Hashes are useful for verifying file integrity, generating fingerprints, and comparing data without exposing the original content. All computation runs locally — your data never leaves your device. Output is available in both Hex and Base64 formats.
How to use
- 1 Type or paste text into the input, or drag and drop a file.
- 2 Select the hash algorithm(s) you need.
- 3 The hash value is computed instantly and shown below.
- 4 Click Copy to copy the hex digest to your clipboard.
- Which hash algorithm should I use?
- SHA-256 is the recommended general-purpose choice — it is secure, widely supported, and used by TLS certificates, code signing, and blockchain systems. SHA-512 offers a larger digest for higher-security needs. Avoid MD5 and SHA-1 for security-critical purposes as they are cryptographically broken — use them only for non-security checksums.
- Can I hash a file to verify its integrity?
- Yes. Drag and drop any file onto the upload area and the tool computes the hash of the entire file contents locally. Compare the resulting digest against the hash published by the file's author to verify the file was not tampered with or corrupted during download.
- Is hashing the same as encryption?
- No. Hashing is a one-way function — a hash digest cannot be reversed to recover the original input. Encryption is two-way and requires a key to decrypt. Use hashing for integrity checks, fingerprints, and (with a proper KDF like bcrypt) password storage. Use encryption when you need to recover the original data.
In-depth guides
More in Generators & Utilities
See all generators & utilities.