MD5 Hash Generator

Get the MD5 digest of a piece of text for checksums, cache keys and comparisons.

What this MD5 generator does, and where your text goes

Type text, press Calculate MD5, and the page sends the text to our server in a JSON request over HTTPS (the ?api=md5 endpoint of this page). PHP's md5() hashes the UTF-8 bytes and returns the 128-bit digest as 32 hexadecimal characters, which appear in the result box with a Copy button. The hashing is not done in your browser. Our code does not write the text or the hash to a database or log file; the request passes through Cloudflare and the host's ordinary web server logs like any other request to this site. Treat it the way you would treat any online hash tool: do not paste real passwords, API keys or private data.

Two details change the result. The page trims leading and trailing whitespace before sending, so hello on its own and hello followed by a space or a newline both give 5d41402abc4b2a76b9719d911017c592. And hashing works on bytes, not characters: café is four characters but five UTF-8 bytes, so a system that hashes the same word stored in Latin-1 gets a different digest.

What an MD5 hash is

MD5 is a hash function published in 1992 as RFC 1321. It maps input of any length to a fixed 128 bits. The same input always gives the same digest, a change of a single bit gives a completely different digest, and there is no way to run it backwards: the only route from a digest to its input is to guess inputs and hash them. That makes it a fingerprint, not a cipher. Nothing is encrypted, so there is nothing to decrypt.

Where MD5 is still reasonable

  • Detecting accidental corruption: comparing a download against the MD5 a publisher lists catches a truncated or damaged file, provided you trust the publisher.
  • Finding duplicates: two files or records with the same digest are, in practice, identical; many de-duplication jobs start this way.
  • Cache and partition keys: a short, fixed-length key derived from a long URL or query is convenient, and nobody is attacking it.
  • Change detection: storing the digest of a configuration file or a rendered page and re-hashing later tells you whether it changed.
  • The common thread: no adversary. Every use above breaks down the moment someone else can choose the input.

Where MD5 must not be used

  • Passwords: MD5 is fast, which is exactly wrong for password storage, because attackers can test enormous numbers of guesses. The OWASP Password Storage Cheat Sheet says to use Argon2id, scrypt or bcrypt instead, and the PHP manual carries the same warning on md5().
  • Signatures and certificates: collisions (two inputs with one digest) are practical. RFC 6151 states that MD5 is no longer acceptable where collision resistance is required, and reports collisions found in about a minute on an ordinary notebook computer.
  • Integrity against tampering: if an attacker can replace both the file and the checksum, or craft two files with one digest, MD5 proves nothing. Use SHA-256.
  • New protocol designs: RFC 6151 also advises against HMAC-MD5 in new designs, even though it does not consider existing HMAC-MD5 uses urgent to replace.

Checking a downloaded file against a published MD5

This page hashes text only; it cannot read a file. To verify a download, hash the file on your own machine and compare all 32 characters with the publisher's value (letter case does not matter):

If the publisher offers a SHA-256 value as well, compare that one instead, using sha256sum on Linux, shasum -a 256 on macOS or certutil -hashfile file.iso SHA256 on Windows.

MD5 compared with other hash functions

Digest length says little on its own; what matters is whether attacks are known and what the function was designed for:

Algorithm Digest Status Reasonable use
MD5 128 bits (32 hex) Collision attacks published since 2004; see RFC 6151 Checksums against accidental damage, cache keys
SHA-1 160 bits (40 hex) Collisions demonstrated; NIST says phase it out by the end of 2030 Legacy systems only
SHA-256 256 bits (64 hex) Part of SHA-2 (FIPS 180-4); no practical attack known File integrity, signatures, certificates
SHA-3-256 256 bits (64 hex) FIPS 202; a different construction from SHA-2 Alternative to SHA-256
Argon2id, scrypt, bcrypt Varies Deliberately slow, with a tunable work factor Password storage only

Frequently asked questions

Is MD5 encryption?

No. Encryption is reversible with a key; a hash is one-way and has no key. An MD5 digest is a 32-character fingerprint of the input, and the input cannot be recovered from it except by guessing.

Can I use MD5 for passwords?

No. It was designed to be fast, so guesses are cheap, and common passwords hashed with plain MD5 appear in public lookup tables. Store passwords with Argon2id, scrypt or bcrypt as OWASP recommends. If you need a password in the first place, our password generator makes a long random one.

Can an MD5 hash be reversed?

Not mathematically. But if the input was short or common, somebody has probably hashed it already, and a web search for the digest returns the input. That is why hashing a name, email address or phone number with MD5 does not anonymise it.

Why does my hash differ from md5sum on the same text?

Usually a trailing newline. echo hello | md5sum hashes "hello" plus a line break and prints b1946ac92492d2347c6235b4d2611184; printf hello | md5sum and this page, which trims the input, give 5d41402abc4b2a76b9719d911017c592. Different text encodings produce different digests too.

Related tool: a hash is often confused with Base64, which is an encoding and fully reversible. The Base64 converter page explains the difference.