What Is MD5?
What is MD5?
MD5 is a hash function that converts any input, text or binary, into a fixed 128-bit value shown as 32 hexadecimal characters. The same input always produces the same hash, and the process is one-way, so you cannot recover the original data from the hash. It was designed in 1991 for integrity checking and is now only safe for non-security uses.
What MD5 stands for
MD5 means Message Digest 5. Ronald Rivest designed it in 1991 as the successor to MD4, and it was published as RFC 1321 in 1992. A message digest is a short fingerprint of a larger piece of data, which is exactly what MD5 produces.
The 32-character output
No matter how large the input, an MD5 hash is always 128 bits long, which is 16 bytes, usually written as 32 hexadecimal characters. The word "hello" hashes to 5d41402abc4b2a76b9719d911017c592, and a 10 gigabyte video file still produces a 32-character hash. That fixed size is why hashes are useful for fingerprinting data.
How the algorithm works
MD5 processes data in 512-bit blocks. The input is padded so its length is a multiple of 512 bits, with the original length recorded at the end. Each block passes through four rounds of 16 operations that mix the data with bitwise operations, modular addition, and nonlinear functions, updating a running 128-bit state. The final state is the hash.
Deterministic and one-way
Two properties define a hash like MD5. It is deterministic, so the same bytes always produce the same hash, and it is one-way, so you cannot work backward from the hash to the input. Because 128 bits cannot represent every possible input, different inputs can share a hash, which is a collision, and for MD5 those collisions became practical to find in 2004.
What MD5 checksums and MD5 files are
A checksum is the hash of a file, used to confirm a download arrived intact. Publishers often release a hash next to a download, and some ship a .md5 file, which is a plain text file containing that hash. You compute the checksum of your file, compare it to the published value, and matching hashes mean the data is unchanged.
The empty string hash
The value d41d8cd98f00b204e9800998ecf8427e is the MD5 hash of an empty string. It appears all over the web because it is the classic example of the algorithm and a quick way to confirm a tool is working. If you see it as a result, the input really was empty.
Is MD5 secure?
For anything an attacker could exploit, no. Collision attacks have been practical since 2004, so MD5 must not be used for signatures, certificates, or password hashing. It survives in legacy systems and for non-security checks, where the only concern is accidental corruption.
Collision demo: same MD5, two different files
Wang et al. 2004 showed MD5 collisions in seconds. The classic pair are two 128-byte blocks starting d131dd02c5e6... with same MD5 d41d8cd98f00b204e9800998ecf8427e. Run md5sum good.bin bad.bin to see the same hash, then sha256sum good.bin bad.bin to see different hashes. That is why MD5 is fine for accidental corruption (use md5sum -c) but must not be used for signatures or certificates, use SHA-256 instead.
Try it in your browser with our MD5 Hash Generator. No upload, no server.
Open MD5 Hash Generator →FAQ
How long is an MD5 hash?
An MD5 hash is always 128 bits, which is 32 hexadecimal characters, regardless of the input size.
Does the same input always give the same MD5?
Yes. MD5 is deterministic, so identical bytes always produce an identical 32-character hash.
Can an MD5 hash be reversed?
No. MD5 is one-way. Online lookup tools only match inputs that are already known, such as common passwords in rainbow tables.
What is an MD5 file?
A .md5 file is a plain text file that contains the MD5 checksum of a download, used to verify the file was not corrupted.