BcryptGenerator.org

MD5 Hash Generator

Generate the MD5 hash of any text. The hash is calculated from the UTF-8 bytes of your input, entirely in your browser — nothing is sent to our servers.

Not for passwords. MD5 is a fast hash — brute-forceable in seconds. Use bcrypt for password storage.

What is MD5?

MD5 (Message-Digest Algorithm 5) is a hash function designed by Ronald Rivest in 1991. It turns any input into a 128-bit fingerprint, written as 32 hexadecimal characters. The same input always gives the same hash, and changing a single character changes the whole hash.

MD5 was built for security, but it is now considered broken. Researchers showed practical collisions (two different inputs with the same hash) in 2004, and in 2012 the Flame malware used an MD5 collision to forge a Microsoft code-signing certificate. Today MD5 is only appropriate where security doesn't matter.

MD5 test vectors

Use these known values to confirm that this tool, or your own code, calculates MD5 correctly:

InputMD5 hash
(empty string)d41d8cd98f00b204e9800998ecf8427e
abc900150983cd24fb0d6963f7d28e17f72
The quick brown fox jumps over the lazy dog9e107d9d372bb6826bd81d3542a419d6

Why your MD5 hash doesn't match

MD5 itself is deterministic, so a mismatch always means the input bytes were different. The usual causes:

When to use MD5 (and when not to)

Still reasonable for:

  • Detecting accidental file corruption after a download or copy
  • Cache keys, ETags and deduplicating non-sensitive data
  • Compatibility with older systems and APIs that require MD5

Never use MD5 for:

  • Storing passwords: use bcrypt or Argon2id instead
  • Digital signatures, certificates or any tamper protection
  • Anything where an attacker controls part of the input

Generate an MD5 hash on the command line or in code

Linux

echo -n "abc" | md5sum

macOS

md5 -s "abc"

Windows PowerShell (files)

Get-FileHash .\file.zip -Algorithm MD5

Node.js

require('crypto').createHash('md5').update('abc', 'utf8').digest('hex')

Python

import hashlib
hashlib.md5("abc".encode("utf-8")).hexdigest()

PHP

md5('abc');

Need the MD5 of a file, or several algorithms at once? Use the hash generator and checksum calculator. Need a secure hash instead? Try the SHA-256 generator, or read what bcrypt is if you are hashing passwords.

MD5 FAQ

Can an MD5 hash be decrypted?+

No. MD5 is a one-way function, so there is no key to decrypt it with. However, MD5 is so fast that huge lookup tables of precomputed hashes exist for common words and passwords, which is why an MD5 hash of a weak password can often be "reversed" by simply looking it up.

How long is an MD5 hash?+

An MD5 hash is 128 bits, usually written as 32 hexadecimal characters. Every input, from an empty string to a multi-gigabyte file, produces a hash of the same length.

Is MD5 safe for file checksums?+

It is fine for detecting accidental corruption, such as a broken download or a bad disk copy. It is not safe against deliberate tampering, because attackers can create two different files with the same MD5 hash. To guard against tampering, use SHA-256.

Should I use MD5 or SHA-256?+

For anything new, use SHA-256. It is still fast, widely supported and has no known practical collisions. Use MD5 only when a system you need to talk to requires it, and never for passwords, where bcrypt or Argon2id is the right choice.