MD2 Encryption is an online MD2 hash tool that computes MD2 hash values for text content, providing 32-bit uppercase / lowercase output formats, and also supports file MD2 checksum verification. All operations run locally in your browser — no data is ever uploaded to any server. MD2 is defined by RFC 1319, the earliest version of the MD hash algorithm family, designed by Ronald Rivest in 1989.
Enter or paste text in the left input area and click the "Encrypt" button — the MD2 hash values (32-bit uppercase/lowercase) will appear on the right
Click the copy button next to any result row to copy the corresponding MD2 value to your clipboard
To verify a file, click the "Select File" button and choose a file — its MD2 hash will be computed automatically
MD2 is a one-way hash algorithm — the original text cannot be recovered from the hash value. It is suitable for data integrity verification, not encryption
The tool gives you free daily uses, so everyday MD2 computation needs are covered at zero cost — no membership required for core features
All hashing runs locally in your browser; your text and files never leave your device, maximizing your privacy
Supports both text and file MD2 checksums with uppercase/lowercase output, meeting integrity verification and deduplication needs
No install, no sign-up — just open the page, paste text or pick a file, and the result is ready to copy
Results return in real time with both uppercase and lowercase formats, ready to copy in one click
Runs in any browser — Windows, macOS, Linux or mobile — so you can compute MD2 anytime, anywhere
MD2 (Message-Digest Algorithm 2) is a cryptographic hash function designed by Ronald Rivest in 1989, defined in RFC 1319. It is the earliest version of the MD hash algorithm family, outputting a 128-bit (16-byte) hash value. MD2 was optimized for 8-bit computers, using byte-oriented operations instead of 32-bit word operations.
Algorithm Process: MD2 consists of three main steps — ① Message Padding: pad the message to a multiple of 16 bytes, with the padding byte value equal to the padding length; ② Checksum Calculation: generate a 16-byte checksum using XOR and substitution operations based on the PI digit table; ③ Compression Function: use a 48-byte internal state (X[0..47]) processed through 18 rounds, each processing 48 bytes, with the core operation being X[j] = X[j] XOR PI_TABLE[t].
Security Note: MD2 is relatively slow and has been found vulnerable to collision attacks and preimage attacks. In 2004, Muller proposed a preimage attack against MD2. MD2 is no longer recommended for any security-sensitive scenarios and is only used for legacy system compatibility and academic research.
The MD hash algorithm family was all designed by Ronald Rivest. Learn about their evolution and differences:
| Algorithm | Release Year | Output Bits | Speed | Security |
|---|---|---|---|---|
| MD2 | 1989 | 128 | Slowest (8-bit oriented) | Broken, not recommended |
| MD4 | 1990 | 128 | Fast (32-bit oriented) | Completely broken |
| MD5 | 1991 | 128 | Fast | Broken (collision attack), usable for non-security purposes |
MD2 (Message-Digest Algorithm 2) is the first version of the MD hash algorithm family, designed by Ronald Rivest in 1989. MD5 is its subsequent improved version — they both belong to the MD family. MD2 was designed for 8-bit computers using byte-oriented operations, making it much slower than MD4/MD5. All three output 128-bit hash values, but their internal structures are completely different.
MD2 has been found vulnerable to collision attacks and preimage attacks and is strongly discouraged for security-sensitive scenarios. Modern projects should use SHA-256, SHA-3 or BLAKE2 instead. MD2 is currently only suitable for legacy system compatibility (e.g., old Java KeyStore requiring MD2 signatures) and cryptographic education.
MD2 was designed for 8-bit computers (like the early Intel 8080), with all operations performed byte-by-byte. MD4 and MD5, on the other hand, were optimized for 32-bit computers using 32-bit word operations, processing 4 bytes at once. Additionally, MD2's 18-round compression and checksum calculation add extra overhead, making MD2 significantly slower than MD4 and MD5.
No. MD2 only has a complete 32-character hexadecimal output (128 bits). Unlike MD5 — where the 16-bit version is the middle substring of the 32-bit result and was used in some legacy systems — MD2 has no such convention. This tool only provides the complete 32-character output.
No. All MD2 operations (text hashing and file checksum) run entirely in your browser using a pure JavaScript implementation of the RFC 1319 algorithm. Your text content and file data never leave your device.
PI_TABLE (S-box) is a core component of the MD2 algorithm — a fixed 256-byte substitution table. It is derived from the fractional digits of π, with each byte being a value from π's decimal expansion. In MD2's compression function, every step uses PI_TABLE for nonlinear substitution: X[j] = X[j] XOR PI_TABLE[t]. This design provides confusion and diffusion properties for the algorithm.
MD2 was designed for 8-bit machines with byte-by-byte operations and 18 compression rounds, making it noticeably slower than MD4/MD5. For short text the difference is negligible; large files are slower. It is only for legacy compatibility and study — use SHA-256 in production.
Both output a 128-bit (32 hex chars) hash, but their internals are entirely different. MD5 also has a "16-bit" variant using the middle 16 hex chars; MD2 has no such variant — this tool only provides the full 32-char uppercase/lowercase output.
Not recommended. MD2 is effectively broken, and plain hashing is unsuitable for passwords anyway. Modern password storage should use bcrypt / scrypt / Argon2 (salted slow hashes), or at least salted SHA-256.
Since hashing runs locally in the browser, the file size is mainly limited by your device's memory. Daily documents and installers verify fine; very large (GB-level) files may use more memory. The free daily quota covers everyday light use.
A hash is a deterministic function — the same input always yields the same output, which is exactly what makes it useful for integrity checks. If results differ, the two inputs differ (whitespace, line breaks or encoding included).
Yes. The tool runs in any browser, including iOS, Android and desktop, and the page is adapted for mobile so you can use it anywhere.
Content last updated:2026-07-15
Online DES/2DES/3DES encryption and decryption tool, supporting all encryption modes and padding methods. Fully processed locally in the browser for security and efficiency.
Online AES encryption and decryption tool, supporting AES-128/192/256, covering all encryption modes and padding methods, secure, efficient, and easy to operate.
Online 3DES encryption/decryption tool, supporting all encryption modes and padding methods, fully processed locally in the browser to ensure data security.
Online RC4 stream cipher encryption/decryption tool, supports multiple key lengths, one-click encryption and decryption, all operations are completed locally in the browser to ensure data security.
Online Rabbit stream cipher encryption/decryption tool, using a high-speed symmetric encryption algorithm, supporting multiple key lengths. All operations are performed locally in the browser to ensure data security.
Online RC2 encryption and decryption tool, supporting ECB/CBC modes, variable key length and effective key bits, all processed locally in the browser to ensure data security.
Online IDEA International Data Encryption Algorithm Tool, supporting multiple encryption modes including ECB/CBC/CFB/OFB/CTR. All operations are performed locally in the browser to ensure data security.
Online Blowfish encryption/decryption tool supporting 128/192/256/448-bit variable keys, ECB/CBC/CFB/OFB modes, and multiple padding methods. All operations are performed locally in the browser to ensure data security.
CAST-128 (CAST5) online encryption and decryption tool, supporting multiple encryption modes such as ECB/CBC/CFB/OFB, flexible padding methods, and output encoding. All operations are performed locally in the browser, ensuring security and efficiency.
Online SM4 National Symmetric Encryption and Decryption Tool, supporting five working modes: ECB/CBC/CFB/OFB/CTR, and multiple padding methods. All operations are performed locally in the browser to ensure data security.
Online RSA asymmetric encryption and decryption tool, supporting key pair generation, public key encryption and private key decryption, private key signing and public key verification. All operations are performed locally in the browser to ensure data security.
Online MD5 hash encryption tool, supporting 16-bit/32-bit output, case switching, and file MD5 verification. All operations are completed locally in the browser, ensuring security and efficiency.
Online SHA-1 hash calculation tool for efficient text encryption and file integrity verification.
Online SHA-256 hash calculation tool for quick text encryption and file integrity verification.
Online SHA-384 hash calculation tool for fast text encryption and file integrity verification.
Online SHA-512 hash calculation tool, supporting text encryption and file integrity verification, quickly generating secure hash values.
Online SM3 National Hash Encryption Tool, supports text hash calculation and file verification, outputs a 256-bit hash value, compliant with GM/T 0004-2012 national standard.
Online Base64 encode/decode tool, supporting text Base64 encoding and decoding, all done locally in the browser, safe and efficient.
Online URL encoding and decoding tool, supports intelligent encoding and decoding of URL parameters, automatically identifies URL structure, processes only the parameter part, completes entirely in the browser locally, safe and efficient.
Online UTF-8 encoding/decoding tool, supporting conversion between text and UTF-8 hexadecimal bytes. All processing is done locally in the browser, ensuring data security.