Home / Developer tools / MD5 generator

MD5 Generator

Get the MD5 hash of any text in hex and Base64. Use it for checksums, cache keys and legacy systems, but not for passwords or security.

Try:
MD5 is broken for security use. Use it for checksums only, and use SHA-256 for anything an attacker could try to fake. Never use it to store passwords.

The hash is calculated in your browser. Your text is not sent to any server.

What MD5 is

MD5 is a hash function designed by Ron Rivest in 1992 (RFC 1321). It turns any input into a 128-bit fingerprint, shown as 32 hex characters. It is quick and everywhere, but it is cryptographically broken: two different inputs with the same MD5 can be made on purpose. That makes it fine for spotting accidental changes and unsafe for anything involving an attacker.

What this MD5 generator does

  • Text, hex or Base64 input. Text is encoded as UTF-8.
  • Hex (lowercase or uppercase) and Base64 output.
  • HMAC-MD5 when you enter a key, for old systems that still require it.
  • Line break options and a compare box to check a hash you were given.

MD5 examples

InputMD5 (hex)
(empty text)d41d8cd98f00b204e9800998ecf8427e
abc900150983cd24fb0d6963f7d28e17f72
hello5d41402abc4b2a76b9719d911017c592

Where MD5 is still fine

  • Detecting accidental corruption of a download or a copied file, when nobody is trying to fool you.
  • Cache keys and ETags, where the hash only names a version of some content.
  • De-duplication of files you control.
  • Avatar services. Gravatar has long identified a user by the MD5 of the trimmed, lowercase email address, and it now accepts SHA-256 as well.
  • Legacy protocols and databases that are defined in terms of MD5.

Where MD5 must not be used

  • Passwords. MD5 is very fast, and unsalted MD5 hashes of common passwords can be looked up in seconds. Use bcrypt or Argon2, for example with PHP password_hash(). If you have an old table of MD5 password hashes, re-hash each password with a modern algorithm the next time the user logs in.
  • Digital signatures and certificates. A forged MD5 collision certificate was shown in 2008, and the Flame malware used an MD5 collision in 2012.
  • Verifying downloads against an attacker. Someone can craft a malicious file with the same MD5. Use SHA-256.

Can an MD5 hash be reversed?

Not mathematically: many inputs share each hash, so the original is not stored in it. But short and common inputs, such as simple passwords, can be found by trying guesses or by using lookup tables. A random 32-character value cannot be found this way.

MD5 compared with SHA-256

MD5SHA-256
Hash length128 bits, 32 hex characters256 bits, 64 hex characters
Collisions can be madeYes, in secondsNo known attack
Use for securityNoYes
Use as a checksumYesYes

MD5 in code

// Node.js
require("crypto").createHash("md5").update("hello").digest("hex");

# Python
import hashlib; hashlib.md5(b"hello").hexdigest()

// PHP
echo md5("hello");

# Command line
printf hello | md5sum        # Linux
printf hello | md5           # macOS
Get-FileHash -Algorithm MD5 file.zip    # PowerShell

Browsers have no built-in MD5 in the Web Crypto API, which is why many sites ask a server to do it. This tool calculates it locally. See also the SHA1 generator, the hash generator, the file hash checker and the hash functions guide.

Frequently asked questions

How do I create an MD5 hash?

Type or paste your text. The MD5 hash appears at once in hex and Base64. Press Copy to use it.

How long is an MD5 hash?

It is 128 bits: 32 hex characters, or 24 characters in Base64.

Can MD5 be decrypted?

No, MD5 is a one-way hash and there is nothing to decrypt. Short and common inputs can still be found by guessing or with lookup tables.

Is MD5 safe for passwords?

No. It is fast and broken. Use bcrypt, scrypt or Argon2 for passwords.

Is MD5 still good as a checksum?

Yes, to catch accidental corruption. If an attacker could replace the file, use SHA-256 instead.

Is my text sent to a server?

No. The hash is calculated by JavaScript in your browser and your text never leaves it.