Last reviewed:
What is MD5?
MD5 is a hash function designed by Ron Rivest in 1991 and specified in RFC 1321. It takes input of any length and produces a 128-bit digest, normally written as 32 hexadecimal characters. The same input always gives the same digest, and changing even one bit of the input changes the digest completely, which makes it useful as a compact fingerprint of a file or string.
For about a decade MD5 was a standard cryptographic hash. Since 2004 researchers have been able to produce collisions, two different inputs with the same MD5, and today that takes seconds on an ordinary computer. Attackers have used MD5 collisions to forge a trusted certificate. MD5 is therefore broken for anything where an attacker can choose the input: digital signatures, certificates, password storage and integrity checks against tampering.
MD5 is still widely used where only accidental changes matter: checksums for detecting corrupted downloads or copies, cache keys, ETags, deduplication of trusted data, and compatibility with older systems and APIs that require it. For new designs, SHA-256 costs almost nothing extra and removes the doubt.
How to use this tool
- Type or paste text into the Text box. The MD5 hash appears as you type. Text is hashed exactly as it is in the box, encoded as UTF-8.
- To hash a file, click Open file…. The file is hashed as raw bytes; click Clear to go back to text.
- Tick Uppercase if the system you are comparing with prints hex in capitals.
- Tick Hash each line separately to get one hash per line, printed as
hash linelike themd5sumcommand. - To verify a checksum, paste the expected value into Compare with expected hash. The tool shows Match or No match, ignoring letter case. In line mode it matches if any line's hash is equal.
- Click Copy to copy the result.
Examples
Well-known values
Input MD5
(empty string) d41d8cd98f00b204e9800998ecf8427e
hello 5d41402abc4b2a76b9719d911017c592
Hello 8b1a9953c4611296a827abf8c47804d7
The quick brown fox jumps over the lazy dog 9e107d9d372bb6826bd81d3542a419d6
Changing one capital letter produces an entirely different digest.
Why a trailing newline matters
"hello" 5d41402abc4b2a76b9719d911017c592
"hello\n" b1946ac92492d2347c6235b4d2611184
"hello\r\n" af5597c29467a96523a70787c319f4db
echo hello | md5sum on Linux hashes hello plus a newline and prints b1946ac9…. Use printf 'hello' | md5sum or echo -n to hash the bare word. If you press Enter at the end of the text box, the newline is hashed too.
Line mode
With Hash each line separately ticked, the input
alpha
beta
produces:
2c1743a391305fbf367df8e4f069f9f9 alpha
987bcab01b929eb2c07877b224215c92 beta
This is handy for hashing a list of identifiers, such as email addresses, for comparison with another system.
Common errors and how to fix them
- Hash differs from the command line. Almost always a trailing newline (see above) or a Windows line ending (
\r\n). Compare the exact bytes, not what the text looks like. - Hash differs from another language. Check that both sides hash UTF-8. In some environments, such as older .NET code using
Encoding.Unicode, strings are hashed as UTF-16 and give a different result. - The expected checksum is 64 characters long. That is SHA-256, not MD5. A 40-character value is SHA-1. MD5 is always 32 hex characters.
- Expected value looks like
XUFAKrxLKna5cZ2REBfFkg==. That is the same digest encoded in Base64, as used by theContent-MD5header and some cloud storage APIs. Convert one form into the other before comparing. - Leading or trailing spaces in the pasted checksum. The compare box trims them, but other tools may not.
- Whitespace inside the text. A copied value may contain a non-breaking space or a tab. Retype the input if a hash should match and does not.
When developers use this
- Verifying that a downloaded file or a file copied between servers matches the MD5 published by the source.
- Reproducing a hash stored by a legacy system, such as cache keys or an old table of hashed identifiers, to debug a lookup.
- Checking an S3 ETag for a single-part upload, which is the MD5 of the object.
- Creating a stable short fingerprint of a configuration or a string for a cache key in a test.
- Comparing lists of hashed identifiers with a partner without exchanging the raw values (for anything sensitive, a keyed hash such as HMAC is safer).
Privacy and how it works
The hash is computed by a small MD5 implementation running in your browser tab. Text is converted to UTF-8 with TextEncoder, files are read with the File API, and no data is uploaded or stored. That lets you hash files you are not allowed to share, such as customer exports or internal builds, without them leaving your machine.
Limitations
- MD5 is not secure for passwords or signatures. It is fast, which lets attackers test billions of password guesses per second, and collisions can be manufactured on purpose. Store passwords with Argon2id, scrypt or bcrypt, and use SHA-256 or HMAC for integrity and authentication.
- A matching MD5 proves a file was not corrupted by accident. It does not prove it was not replaced by an attacker who could also change the published checksum.
- Very large files are read into memory in one piece, so multi-gigabyte files may be slow or fail in the browser; use
md5sumorGet-FileHash -Algorithm MD5for those.
FAQ
Is MD5 safe for passwords?
No. MD5 is designed to be fast, and graphics cards can compute billions of MD5 hashes per second, so leaked MD5 password hashes are cracked quickly. Use a slow, salted password hashing algorithm such as Argon2id, scrypt or bcrypt.
Can an MD5 hash be reversed?
Not mathematically, but short or common inputs can be found by guessing. Websites that "decrypt" MD5 simply look the hash up in huge tables of previously hashed words and passwords.
Is MD5 still fine for checksums?
Yes, for detecting accidental corruption, such as a broken download or a bad disk copy. Random errors will not produce a matching MD5. If an attacker might tamper with the file, use SHA-256 published over a trusted channel or a signature.
Why does my hash not match the one from another tool?
The input is different, even if it looks the same. Common causes are a trailing newline, Windows line endings, a different text encoding, or invisible characters copied from a web page. This tool hashes exactly what is in the box as UTF-8.
Does uppercase or lowercase matter?
Not for the value: hexadecimal digits are case-insensitive, and the compare box ignores case. Some systems compare strings exactly, so use the Uppercase option to match their format.
Can I hash a file without uploading it?
Yes. Open file reads the file locally with your browser's File API and hashes its raw bytes. Nothing is sent over the network.
What is the difference between MD5, SHA-1 and SHA-256?
They produce 128, 160 and 256-bit digests (32, 40 and 64 hex characters). MD5 and SHA-1 both have practical collision attacks; SHA-256 has none known and is the current default for integrity checks.