What is MD5?
MD5 (Message-Digest Algorithm 5) is a hash function designed by Ronald Rivest in 1991. It turns any input into a 128-bit fingerprint, written as 32 hexadecimal characters. The same input always gives the same hash, and changing a single character changes the whole hash.
MD5 was built for security, but it is now considered broken. Researchers showed practical collisions (two different inputs with the same hash) in 2004, and in 2012 the Flame malware used an MD5 collision to forge a Microsoft code-signing certificate. Today MD5 is only appropriate where security doesn't matter.
MD5 test vectors
Use these known values to confirm that this tool, or your own code, calculates MD5 correctly:
| Input | MD5 hash |
|---|---|
| (empty string) | d41d8cd98f00b204e9800998ecf8427e |
| abc | 900150983cd24fb0d6963f7d28e17f72 |
| The quick brown fox jumps over the lazy dog | 9e107d9d372bb6826bd81d3542a419d6 |
Why your MD5 hash doesn't match
MD5 itself is deterministic, so a mismatch always means the input bytes were different. The usual causes: