Hash Generator
Generate MD5, SHA-1, and SHA-256 hashes from any text.
- MD5
Hash will appear here. - SHA-1
Hash will appear here. - SHA-256
Hash will appear here.
This computes MD5, SHA-1 and SHA-256 hashes in your browser. A hash is a one-way function producing a fixed-length fingerprint of any input — the same input always gives the same output, and the output cannot be reversed to recover the input. Two of these three are broken for security purposes, and knowing which is which matters: MD5 and SHA-1 should be used only for non-security checks like detecting accidental corruption. MD5 produces 128 bits and has been collision-broken since 2004; SHA-1 produces 160 bits and fell to a practical collision in 2017. SHA-256 produces 256 bits and remains sound. A separate and common misuse is hashing passwords: plain SHA-256 is far too fast, letting an attacker try billions of guesses per second, which is why bcrypt, scrypt and Argon2 exist. Changing one bit of input changes roughly half the output bits.
About the Hash Generator
Generate MD5, SHA-1, and SHA-256 hashes from any text in your browser. SHA-1 and SHA-256 use the native Web Crypto API for speed and accuracy, and MD5 is implemented in pure JavaScript locally — your input never leaves your device.
How to use the Hash Generator
- 01Type or paste your text into the input area.
- 02All three hashes update live as you type.
- 03Click the "Copy" button next to any hash to copy it.
- 04Clear the input and start again any time — nothing is stored.
Why use our Hash Generator
- 01
Three algorithms
MD5, SHA-1, and SHA-256 generated side by side from the same input.
- 02
Web Crypto powered
SHA-1 and SHA-256 use the browser's native crypto.subtle for correctness.
- 03
Live updates
Hashes are recomputed instantly as you edit the text — no submit button.
- 04
Private & free
Everything runs in your browser; nothing is logged, uploaded, or shared.
Is MD5 or SHA-1 still safe to use?
MD5 has been comprehensively broken since 2004. Collisions — two different inputs producing the same hash — can be generated on ordinary hardware in seconds, and this has been used in real attacks including the Flame malware, which forged a Microsoft code-signing certificate. It must never be used for signatures, certificates, integrity verification against a deliberate attacker, or passwords. SHA-1 was theoretically weakened from 2005 and definitively broken in 2017 when Google and CWI Amsterdam published SHAttered, two distinct PDF files with the same SHA-1 hash. Browsers stopped trusting SHA-1 certificates that year and Git has been migrating away from it since. SHA-256, part of the SHA-2 family, has no practical attacks and remains the sensible default for general-purpose hashing. Where MD5 and SHA-1 remain legitimate is in detecting accidental change rather than deliberate forgery: verifying a file downloaded correctly, deduplicating files, or as a fast non-cryptographic checksum.
Why hashes are wrong for storing passwords
This is the most consequential misunderstanding about hashing. All three algorithms here are designed to be fast, and speed is exactly the wrong property for password storage. A modern GPU computes billions of SHA-256 hashes per second, so an attacker holding a stolen database of hashed passwords can try every word in a dictionary, every common password and every short combination in a very short time. Adding a salt — a unique random value per password — defeats precomputed rainbow tables and is necessary, but it does not slow the attacker down per password. The correct tools are deliberately slow, memory-hard key derivation functions: Argon2id is the current recommendation, with bcrypt and scrypt as established alternatives and PBKDF2 acceptable where a certified implementation is required. These are tuned so that a single verification takes a noticeable fraction of a second, which is invisible at login and catastrophic for brute force. If you are storing passwords, none of the algorithms on this page are the right answer.
Verifying downloads and comparing hashes properly
The everyday legitimate use is confirming a file arrived intact. A publisher lists the SHA-256 of a release; you compute the hash of what you downloaded and compare. If they match, the file is byte-identical to what was published. Two practical points make this meaningful rather than ceremonial. First, the checksum must come from a different channel than the file — a checksum hosted on the same server as a compromised download is worthless, which is why projects publish signed checksum files or list hashes on a separate domain. Second, compare the whole string. Attackers exploit the habit of checking the first and last few characters, and a partial match is not a match. Hash comparison should also be case-insensitive, since hexadecimal output is written in either case, and length alone identifies the algorithm: 32 hex characters is MD5, 40 is SHA-1, 64 is SHA-256.
Algorithm status and appropriate use
| Algorithm | Output length | Security status | Use for |
|---|---|---|---|
| MD5 | 128 bits (32 hex) | Broken since 2004 | Accidental-corruption checks only |
| SHA-1 | 160 bits (40 hex) | Broken since 2017 | Legacy compatibility only |
| SHA-256 | 256 bits (64 hex) | No practical attack | General-purpose default |
| Argon2id / bcrypt | Varies | Current recommendation | Password storage |
Never use MD5, SHA-1 or SHA-256 to store passwords — they are far too fast. Use a slow key derivation function.
Frequently asked questions
What is a hash?
A one-way function that turns any input into a fixed-length fingerprint. The same input always produces the same output, and the output cannot be reversed to recover the input.
Is MD5 still safe?
No. It has been broken since 2004 and collisions can be produced in seconds. Use it only to detect accidental corruption, never against a deliberate attacker.
Is SHA-1 safe?
No. It was definitively broken in 2017 by the SHAttered attack, which produced two different PDFs with the same hash. Browsers stopped trusting SHA-1 certificates that year.
Which should I use?
SHA-256 for general-purpose hashing. It is part of the SHA-2 family and has no practical attacks against it.
Can I use these to store passwords?
No. All three are designed to be fast, which is exactly wrong for passwords. Use Argon2id, bcrypt or scrypt, which are deliberately slow and memory-hard.
Can a hash be reversed?
Not mathematically. But short or common inputs can be found by brute force or lookup tables, which is why unsalted password hashes are so easily cracked.
How do I verify a download?
Compute the hash of the file and compare it to the publisher's stated value — obtained from a different channel than the file itself. Compare the entire string, not just the ends.
Why do two files have the same hash?
Either they are byte-identical, or you are using a broken algorithm where a collision was deliberately constructed. With SHA-256, identical hashes mean identical files.
Is my input sent anywhere?
No. Hashing runs entirely in your browser and nothing is transmitted or logged.
Last updated
SHA family specified in NIST FIPS 180-4. SHA-1 collision demonstrated by Stevens et al., SHAttered (2017). Password storage guidance follows OWASP and NIST SP 800-63B.