Generate an MD5 or HMAC-MD5 hash of any text, and verify it against an expected value.
Hashed locally in your browser — your text never leaves your device.
How is an MD5 hash calculated?
MD5 pads the message to a multiple of 512 bits, appends the original length, then runs four rounds of 16 operations per block, mixing a 128-bit state with constants derived from the sine function. The result is 32 hexadecimal characters. MD5 is broken for security use — prefer SHA-256.
Understanding your result
MD5 is fast and produces a compact fixed-length fingerprint, which keeps it useful for checksums, cache keys and deduplication. It is not, however, cryptographically secure: practical collision attacks have existed since 2004, meaning an attacker can construct two different inputs with the same digest. That rules it out for password storage, digital signatures and anything where an adversary controls the input. For those, use SHA-256 or, for passwords specifically, a slow purpose-built function such as bcrypt or Argon2. Note also that hashing is one-way — the "MD5 decrypt" sites you may have seen are simply looking your hash up in a table of precomputed common strings.
Formula and method
MD5 pads the message to a multiple of 512 bits, appends the original length, then runs four rounds of 16 operations over each block, mixing a 128-bit state with a table of constants derived from the sine function. The final state, written as 32 hexadecimal characters, is the digest.
Assumptions and limitations
MD5 is not a security function. Collisions can be produced deliberately, so it must never be used for passwords, signatures or any decision an attacker could influence. This tool hashes text you paste rather than files directly, and hashing is one-way — a digest cannot be turned back into the original input.
Worked example
Hashing the string "abc" always produces 900150983cd24fb0d6963f7d28e17f72 — one of the published RFC 1321 test vectors. Change a single letter and the digest changes completely.
How to use this tool
- Paste the text you want to hash.
- Choose plain MD5, or HMAC-MD5 and supply a secret key.
- Optionally paste an expected hash to verify against.
- Copy the 32-character hexadecimal digest.
Common mistakes to avoid
- Using MD5 to store passwords — it is far too fast and long since broken.
- Expecting to reverse a hash back into the original text; that is not possible.
- Comparing hashes generated from text with different line endings or trailing spaces.
- Treating a matching MD5 as proof of authenticity when an attacker controls the file.
About the MD5 Hash Generator
The MD5 Hash Generator produces the 128-bit MD5 digest of any text, following RFC 1321 exactly. It also supports keyed HMAC-MD5 for message authentication, and includes a checker that compares your result against an expected hash so you can confirm two pieces of content are identical.
Who should use this tool
Developers verifying checksums, sysadmins comparing files and anyone integrating with a legacy system that still requires MD5.
Benefits
- Implements RFC 1321 exactly — verified against the official test vectors.
- Includes HMAC-MD5, which browsers cannot produce natively.
- Built-in checker tells you whether a digest matches, with a plain-English verdict.
- Handles full UTF-8 text, including emoji and accented characters.
Practical use cases
- Verifying that a downloaded file matches its published checksum.
- Generating cache keys or deduplication fingerprints.
- Producing an HMAC-MD5 signature for a legacy API.
- Confirming two copies of a document are byte-for-byte identical.
Explore all Security and Privacy tools
Frequently asked questions
Is MD5 secure?
No. Collisions can be produced deliberately, so MD5 must not be used for passwords, signatures or any security decision. It remains fine for non-adversarial checksums and cache keys.
Can I decrypt an MD5 hash?
No. MD5 is a one-way function, not encryption. Sites claiming to decrypt it are looking the hash up in a precomputed table of common inputs.
Why is MD5 not in my browser’s built-in crypto?
The Web Crypto API deliberately omits MD5 because it is broken. This tool therefore implements the algorithm in JavaScript, still entirely on your device.
What is HMAC-MD5 for?
It combines a secret key with the message to prove the message came from someone holding that key. Some older APIs still require it, though HMAC-SHA256 is the modern choice.
Why do two files that look identical give different hashes?
Almost always invisible differences: Windows CRLF versus Unix LF line endings, a trailing newline, or a byte-order mark at the start of the file.