What is MD5?

MD5 (Message Digest Algorithm 5) is a widely used cryptographic hash function that produces a 128-bit hash value. Learn what MD5 is, how it works, and when to use or avoid it.

Definition
Message Digest Algorithm 5

MD5 is a cryptographic hash function that takes an input of any size and produces a fixed-size 128-bit (16-byte) hash value, typically expressed as a 32-character hexadecimal string. It was designed by Ronald Rivest in 1991. MD5 is a one-way function — given a hash, you cannot reverse-engineer the original input.

How MD5 Works

MD5 processes input in 512-bit blocks and outputs a 128-bit digest: • "hello" → 5d41402abc4b2a76b9719d911017c592 • "Hello" → 8b1a9953c4611296a827abf8c47804d7 • Even a single character change produces a completely different hash This "avalanche effect" makes MD5 useful for detecting data corruption — if two files have the same MD5, they are almost certainly identical.

MD5 Security Vulnerabilities

MD5 is considered cryptographically broken: • Collision attacks — two different inputs producing the same hash have been demonstrated • Rainbow table attacks — precomputed lookup tables can reverse common hashes • GPU cracking — billions of MD5 hashes can be computed per second MD5 should NEVER be used for: • Storing passwords (use bcrypt, scrypt, or Argon2) • Digital signatures or certificates • Security-critical applications

Where MD5 is Still Used

Despite security flaws, MD5 remains useful for non-security purposes: • File integrity verification — checking if a downloaded file is corrupted • Checksums — comparing file versions in backup systems • Caching — generating cache keys from content • Deduplication — quickly identifying duplicate files • Legacy systems — many older systems still use MD5 and cannot easily be updated

Try it yourself

Generate UUID

About MD5

MD5 was introduced as an improvement over MD4 in 1992. It was widely adopted for digital signatures and SSL certificates in the 1990s. In 2004, researchers demonstrated practical collision attacks, and by 2008 it was proven that forged SSL certificates could be created using MD5 collisions. Today it is deprecated for security use but remains one of the most ubiquitous hash functions in computing.

FAQ

What does MD5 stand for?
MD5 stands for Message Digest Algorithm 5.
Is MD5 safe for passwords?
No. MD5 is fast to compute, which makes it easy to crack with brute force or rainbow tables. For passwords, use a slow hashing algorithm designed specifically for that purpose, such as bcrypt, scrypt, or Argon2.
What is the length of an MD5 hash?
An MD5 hash is always 128 bits (16 bytes), which when encoded as hexadecimal is exactly 32 characters long.

Related Tools