DevKit

MD5 vs SHA-256

Both produce fixed-length digests from arbitrary input, but their security profiles differ dramatically.

PropertyMD5SHA-256
Output length128 bits (32 hex chars)256 bits (64 hex chars)
SpeedVery fastFast (slightly slower)
Collision resistanceBroken (collisions found in 2004)Secure (no known collisions)
Pre-image resistanceWeakenedStrong
Year introduced19922001
Use for passwordsNeverNot ideal (use bcrypt/argon2)
Use for integrityLegacy onlyRecommended

When MD5 is still acceptable

When to use SHA-256

Bottom line

Default to SHA-256 for everything. Only use MD5 when backward compatibility demands it and security is not a concern. Generate both with our Hash Generator.