Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes from text.
Hash Algorithms Compared
- MD5 - Produces a 128-bit (32 character) hash. It's fast but cryptographically broken since 2004. Researchers can generate collisions (two different inputs with the same hash) in seconds. Still fine for non-security stuff like cache keys or quick checksums.
- SHA-1 - Produces a 160-bit (40 character) hash. Google demonstrated a practical SHA-1 collision in 2017 (the SHAttered attack). Major browsers stopped trusting SHA-1 SSL certificates back in 2017. Don't use it for anything security-related.
- SHA-256 - Produces a 256-bit (64 character) hash. This is the current workhorse. Bitcoin uses it. SSL/TLS certificates use it. Git uses it in newer versions. No known practical attacks exist against SHA-256.
- SHA-512 - Produces a 512-bit (128 character) hash. Stronger than SHA-256 with longer output. Actually runs faster than SHA-256 on 64-bit processors. Used when you need the highest level of integrity checking.
Hashing vs. Encryption
People mix these up all the time. Hashing is one-way. You can't reverse a hash to get back the original text. That's by design. Encryption is two-way. You encrypt data with a key and decrypt it with the same key (or a related key). Use hashing for integrity checks and password storage. Use encryption when you need to get the original data back.
The Avalanche Effect
Change a single character in your input and the hash output changes completely. Try it. Hash "hello" and then hash "Hello" (capital H). The two hashes will look nothing alike. This property makes hashes great for detecting even tiny changes in data.
Don't Use These for Passwords
MD5 and SHA-256 are too fast for password hashing. An attacker with a modern GPU can try billions of SHA-256 hashes per second. For passwords, use purpose-built algorithms like bcrypt, scrypt or Argon2id. These are intentionally slow and include built-in salt handling.
How to Use
- Enter or paste your text in the input area.
- All four hash values (MD5, SHA-1, SHA-256, SHA-512) appear instantly.
- Click the copy button next to the hash you need.
Frequently Asked Questions
Can I reverse a hash to get the original text?
Hash functions are mathematically one-way - there is no working backwards from a hash to the input. What attackers actually do is guess: rainbow tables (precomputed hash lookups) and brute force. That's why salting and strong passwords matter.
Which hash algorithm should I use?
For file integrity and checksums, SHA-256 is the standard. For passwords, don't use any of these - use bcrypt, scrypt or Argon2id instead. For quick non-security checksums where speed matters, MD5 still works fine.
Is MD5 still safe?
Not for anything security-related. MD5 collisions can be generated in seconds on a regular laptop. It's still acceptable for non-security uses like cache busting, deduplication or verifying file downloads from trusted sources.
What's a hash collision?
A collision happens when two different inputs produce the same hash output. For MD5, attackers can deliberately create collisions. For SHA-256, no practical collision has ever been found, making it safe for security applications.
Why shouldn't I use SHA-256 for password hashing?
Because it's designed to be fast. A GPU can compute billions of SHA-256 hashes per second, making brute-force attacks practical. Password-specific algorithms like bcrypt are intentionally slow (configurable via cost factor), which makes brute-force attacks take years instead of seconds.