MD2 Hash Generator

Generate MD2 hash values online. Supports UTF-8, UTF-16, Hex, and Base64 input encodings. Also supports HMAC-MD2 with a secret key.

Input
Output
Share Link
Settings

Related Hash Tools

Frequently Asked Questions

What is MD2?
MD2 (Message Digest 2) is a cryptographic hash function designed by Ronald Rivest in 1989 and published as RFC 1319. It produces a 128-bit (16-byte) hash digest. MD2 is the predecessor to MD4 and MD5 and is considered cryptographically broken today.
What is the output length of MD2?
MD2 always produces a 128-bit output, displayed as a 32-character lowercase hexadecimal string (or 24 characters in Base64).
Is MD2 safe to use for passwords?
No. MD2 is cryptographically broken and must not be used for passwords, digital signatures, or any security-critical application. Use bcrypt, Argon2, or SHA-256 for security purposes.
How does MD2 differ from MD4 and MD5?
MD2 (1989) was designed for 8-bit processors and uses a different internal structure than MD4 and MD5. MD4 (1990) and MD5 (1991) are optimized for 32-bit processors and are significantly faster. All three produce 128-bit digests.

About MD2 Hash

The MD2 (Message Digest 2) algorithm was designed by Ronald Rivest and published as RFC 1319 in 1992. It was optimized for 8-bit computers and processes data in 16-byte blocks, producing a 128-bit message digest. While historically significant as one of the earliest standardized hash functions, MD2 is no longer suitable for cryptographic security.

How MD2 Works

MD2 pads the message to a multiple of 16 bytes, appends a 16-byte checksum, then initializes a 48-byte state buffer and processes the padded message in 16-byte chunks using a substitution table derived from the digits of pi. The final 16 bytes of the state are the digest.

When to Use MD2

MD2 is primarily of historical and academic interest today. It may still appear in legacy systems or old digital certificates. If you need to verify or replicate an MD2 hash from a legacy system, this tool provides an accurate implementation. For any new project, choose a modern hash function such as SHA-256 or SHA-3.

MD2 vs MD4 vs MD5

All three algorithms were designed by Ronald Rivest and produce 128-bit digests. MD2 is the slowest and was designed for 8-bit systems. MD4 improved performance for 32-bit processors. MD5 further refined the design and became widely adopted. All three are now considered insecure for cryptographic purposes, though MD5 remains widely used for non-security integrity checks.