MD2 Generator
Generate MD2 hashes online — free, instant, and fully private. This MD2 hash generator implements RFC 1319 in pure JavaScript: hash text, checksum files, run batch MD2 hashing line-by-line, or compute HMAC-MD2. No other online MD2 generator combines all four.
Text is encoded as UTF-8 before hashing, matching RFC 1319 byte semantics.
The file is read with the FileReader API and hashed in your browser's memory. Nothing is sent anywhere — verify in DevTools → Network.
RFC 2104 construction with MD2 and a 64-byte block size. Provided for legacy interop — prefer HMAC-SHA-256 for new systems.
Why this MD2 generator?
📜 True RFC 1319 implementation
Not a server round-trip, not Web Crypto (browsers don't ship MD2). A from-scratch JavaScript MD2 engine — padding, checksum and 18-round transform exactly per the RFC — that reproduces all 7 official test vectors.
📋 Batch MD2 hashing
Hash up to 200 strings at once, one per line, and export the results as CSV. Ideal for checksumming datasets, test fixtures, or migration lists.
📁 File checksums
Compute the MD2 checksum of any file entirely client-side — handy when an old software archive publishes legacy MD2 checksums.
🔑 HMAC-MD2 included
The only free online tool combining an MD2 hash generator with HMAC-MD2 for legacy API-signature interop.
How to generate an MD2 hash
- Type or paste text into the Text tab — the MD2 digest appears instantly (no button needed).
- Pick the hex case. Most systems expect lowercase; some legacy tools want UPPERCASE.
- Copy or download. One click copies the 32-character hash; download saves it as a .txt file.
Need many at once? The Batch tab hashes up to 200 lines and exports CSV. Checking a download? The File tab checksums files without uploading them.
RFC 1319 test vectors self-checking…
Every correct MD2 implementation must reproduce these values from RFC 1319 Appendix A.5. Click any row to re-verify it live against this page's engine:
| Input | MD2 digest | Status |
|---|
Beware of typo drift: some sites republish these vectors incorrectly (especially the empty-string digest). When in doubt, trust the RFC.
MD2 vs MD5 vs SHA-256
| Algorithm | Digest | Designed for | Security status |
|---|---|---|---|
| MD2 | 128-bit | 8-bit CPUs (1989) | Broken — collisions demonstrated |
| MD5 | 128-bit | 32-bit CPUs (1992) | Broken — collisions practical |
| SHA-256 | 256-bit | Modern CPUs (2001) | Secure — current standard |
Rule of thumb: MD2 and MD5 are history lessons and legacy glue. Anything adversarial gets SHA-256 or better.
MD2 hash generator — FAQ
What is MD2?
MD2 (Message-Digest Algorithm 2) is a cryptographic hash function designed by Ronald Rivest in 1989 and published as RFC 1319. It was optimized for 8-bit processors and produces a fixed 128-bit (32 hexadecimal characters) digest from any input. It is the oldest member of the MD family that also includes MD4 and MD5.
How do I generate an MD2 hash online?
Paste your text into the Text tab above — the MD2 checksum is computed instantly as you type. You can switch between lowercase and UPPERCASE hex, copy the result with one click, or download it. For many inputs at once use the Batch tab (one string per line); to hash a file, use the File tab.
Is MD2 secure?
No. MD2 is cryptographically broken: practical collision attacks have been publicly demonstrated, so an attacker can craft two different inputs with the same MD2 hash. Never use MD2 for passwords, digital signatures, or any security purpose. This tool exists for legacy compatibility, checksums in non-adversarial settings, education, and protocol analysis — for anything security-related use SHA-256.
What is the MD2 hash of "abc"?
MD2("abc") = da853b0d3f88d99b30283a69e6ded6bb. Other reference values from RFC 1319: MD2("") = 8350e5a3e24c153df2275c9f80692773 and MD2("message digest") = ab4f496bfb2a530b219ff33031fe06b0. Warning: several websites republish these vectors with typos — always validate against RFC 1319 Appendix A.5. This page self-checks all 7 official vectors.
What is the difference between MD2 and MD5?
Both produce 128-bit digests, but MD2 (1989) was designed for 8-bit machines while MD5 (1992) targets 32-bit processors and is much faster in software. MD5 is also cryptographically broken (collisions), so neither should be used for security today. MD2 survives mainly in legacy systems, old certificates (md2WithRSAEncryption), and teaching material.
Can I compute the MD2 checksum of a file?
Yes. Open the File tab, choose any file, and its MD2 hash is computed locally with the FileReader API — the file never leaves your device and is never uploaded. This is useful for verifying legacy checksums or comparing against values published by old software archives.
What is HMAC-MD2?
HMAC-MD2 is the HMAC keyed-hash construction (RFC 2104) instantiated with MD2: HMAC(K,m) = MD2((K′ ⊕ opad) ∥ MD2((K′ ⊕ ipad) ∥ m)) with a 64-byte block size. It is provided here for interoperability with legacy systems that require it. For new designs, prefer HMAC-SHA-256 — a keyed wrapper does not make MD2 a good choice for new systems.
Why does another site show a different MD2 hash for the same input?
The most common cause is typo drift: a few sites republish the RFC 1319 test vectors with transcription errors (notably wrong digests for the empty string). A correct implementation must reproduce all 7 vectors in RFC 1319 Appendix A.5. This tool runs those vectors through its own engine — if any failed, you would see it in the test-vectors table below.
Related security tools
Identify an unknown hash with our Hash Identifier (it recognizes MD2 among 300+ types), verify file integrity with the File Checksum Verifier, generate modern keyed hashes with the HMAC Generator, or compute SHA-1 hashes.
Free tool by NRTechStudio