Hash Generator: Compute SHA-1, SHA-256, SHA-384 and SHA-512 Online
Hash Generator: Compute SHA-1, SHA-256, SHA-384 and SHA-512 Online
Cryptographic hashes are the backbone of modern security: integrity checks, password storage, digital signatures, blockchain, file deduplication, and content-addressable storage all rely on them. Our Hash Generator computes SHA-1, SHA-256, SHA-384 and SHA-512 entirely in your browser using the native Web Crypto API â your data never leaves the page.
What is a cryptographic hash?
A cryptographic hash function is a one-way mathematical function that takes any input and produces a fixed-length, deterministic output (the digest). Good hash functions have three properties:
- Deterministic â the same input always produces the same hash.
- Avalanche effect â a tiny change in the input produces a wildly different hash.
- Pre-image resistance â given a hash, it is computationally infeasible to recover the original input.
Which algorithm should I use?
| Algorithm | Output size | Status | Recommended for |
|---|---|---|---|
| SHA-1 | 160 bits | Deprecated for security | Legacy compatibility, Git object IDs |
| SHA-256 | 256 bits | Secure | General use, TLS, signatures, JWT (HS256) |
| SHA-384 | 384 bits | Secure | Higher-security signatures, Subresource Integrity |
| SHA-512 | 512 bits | Secure | Maximum collision resistance, password KDFs |
â ïž SHA-1 is broken for collision resistance since 2017 (Googleâs SHAttered attack). Donât use it for signatures or password hashing. SHA-256 is the safe modern default.
Common use cases
- File integrity checks â verify a download matches the publisherâs checksum.
- Subresource Integrity (SRI) â pin third-party scripts with
integrity="sha384-..."attributes. - Git â every commit, tree and blob is identified by a SHA-1 (and now SHA-256) hash.
- JWT signing â
HS256uses HMAC with SHA-256. - Deduplication â detect identical files without comparing them byte-by-byte.
How our tool works
Everything runs client-side via crypto.subtle.digest():
const data = new TextEncoder().encode("hello");
const digest = await crypto.subtle.digest("SHA-256", data);
// 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
You can hash plain text, paste large payloads, or drop a file (any size â the API streams the buffer). Switch the output to Hex (the standard format) or Base64 (compact, useful for Authorization headers and SRI).
Things hash functions are not
- â Encryption â hashes are one-way; you canât recover the input.
- â Password storage on their own â use a password-hashing function like Argon2, bcrypt, or scrypt instead, which adds salting and intentional slowness.
- â Random IDs â use
crypto.randomUUID()or our Key Generator for that.
Try it now
Head over to the Hash Generator and start computing checksums in seconds. No uploads, no tracking, no account.
Found this helpful? Try our free tools!
Explore Our Tools â