Intosoft 工具
⚖️

Hash Algorithm Comparison

Comprehensive comparison of MD5, SHA-1, SHA-256, SHA-512, and SHA-3. Find the right algorithm for your security needs.

Quick Recommendation

For most use cases, use SHA-256. It offers the best balance of security, performance, and compatibility. For passwords, use Argon2 or bcrypt instead.

Cryptographic Hash Functions

AlgorithmOutputStatus
MD5
1992
128 bits
32 chars
Broken
SHA-1
1995
160 bits
40 chars
Deprecated
SHA-256
2001
256 bits
64 chars
Secure
SHA-384
2001
384 bits
96 chars
Secure
SHA-512
2001
512 bits
128 chars
Secure
SHA-3 (256)
2015
256 bits
64 chars
Secure

Which Algorithm for Which Use Case?

Use Case✓ Recommended
File checksums
*MD5 acceptable for non-security checksums only
SHA-256
Password storage
Never use plain hashes for passwords
Argon2 / bcrypt
Digital signatures
Required for SSL/TLS certificates
SHA-256+
HMAC
API authentication, JWTs
SHA-256
Content addressing
Git, IPFS, Docker images
SHA-256
Blockchain
Bitcoin uses double SHA-256
SHA-256

Special Note: Password Hashing

Never use plain cryptographic hashes (MD5, SHA-*) for passwords. They're too fast, making brute-force attacks trivial. Use dedicated password hashing algorithms designed to be slow:

bcrypt
1999
Industry standard for password hashing. Adjustable cost factor.
Argon2
2015
Winner of Password Hashing Competition. Memory-hard.
scrypt
2009
Memory and CPU hard. Used in some cryptocurrencies.
PBKDF2
2000
Older but still acceptable. NIST recommended.

Hash Output Examples

All algorithms produce fixed-length output regardless of input size. Here's what "Hello" looks like as each hash:

MD5 (32 chars)
8b1a9953c4611296a827abf8c47804d7
SHA-1 (40 chars)
f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0
SHA-256 (64 chars)
185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
SHA-512 (128 chars)
3615f80c9d293ed7402687f94b22d58e529b8cc7916f8fac7fddf7fbd5af4cf777d3d795a7a00a16bf7e7f3fb9561ee9baae480da9fe7a18769e71886b03f315