Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes of text.
Last updated August 26, 2026
MD5
—
SHA-1
—
SHA-256
—
SHA-512
—
About this tool
A hash function takes input of any size and produces a fixed-length fingerprint, used to verify data integrity, detect duplicates, or (for stronger algorithms) store passwords. This tool generates MD5, SHA-1, SHA-256, and SHA-512 hashes. MD5 and SHA-1 are fast but cryptographically broken — fine for checksums, but never for security-sensitive use. SHA-256 and SHA-512 are the current standard for anything security-related.
Hash algorithm comparison
| Algorithm | Output size | Still safe for security? |
|---|---|---|
| MD5 | 128 bits | No — checksums/dedup only |
| SHA-1 | 160 bits | No — deprecated for security use |
| SHA-256 | 256 bits | Yes |
| SHA-512 | 512 bits | Yes |
Code examples
The second line (where shown) is the inverse operation.
| Language | Code |
|---|---|
| JavaScript | await crypto.subtle.digest('SHA-256', data) |
| Python | hashlib.sha256(b'text').hexdigest() |
| PHP | hash('sha256', 'text') |
| Shell | echo -n 'text' | sha256sum |
Frequently asked questions
Should I use this to hash passwords?
No. General-purpose hash functions like SHA-256 are too fast, making them vulnerable to brute-force attacks on passwords. Use a password-specific algorithm like bcrypt, scrypt, or Argon2 instead.
Why does the same input always produce the same hash?
Hash functions are deterministic by design — that's what makes them useful for verifying that data hasn't changed.
Is my input sent anywhere to compute the hash?
No — all hashing runs locally in your browser using the Web Crypto API (for SHA) or a JS implementation (for MD5).
Do I need a unique ID instead of a hash?
A hash fingerprints existing data. To generate a new identifier, use the UUID Generator for UUID v4 or time-ordered UUID v7 values.