MD5 Hash Generator

Two lanes, side by side. Feed each one text, a file or a checksum somebody published, and the spine between them says whether the digests match and exactly which characters drifted.

MD5 comparison workbench

A matching MD5 proves two files are the same by accident, not that nobody swapped them on purpose. Collisions are cheap. For passwords or signed releases, use SHA-256.

Lane A
Digest
Type something to hash it.
Lane B
Digest
Type something to hash it.

Fill both lanes and the spine between them reports whether the digests match.

MD5 is broken as a security hash and still fine for catching a bad copy

Ron Rivest published MD5 in RFC 1321 in April 1992, and for a decade it was the default way to fingerprint a file. Then in August 2004 a team led by Xiaoyun Wang produced two different inputs with the same digest, and every use of MD5 that depended on nobody being able to do that fell over.

What survived is the boring half of the job. A corrupted download, a truncated copy, a file that got mangled by an FTP client in text mode: MD5 catches all of those, instantly, on any hardware. The digest cost nothing to compute in 1992 and costs less now. Knowing which half you are relying on is the whole decision.

What the 32 characters are

MD5 pads your input to a multiple of 512 bits, then chews through it one 512 bit block at a time. Each block runs 64 operations across four rounds, mixing four 32 bit registers with a table of constants derived from the sine function. When the last block is done, those four registers are the answer: 128 bits, written out as 32 hexadecimal characters.

The length never moves. An empty string gives d41d8cd98f00b204e9800998ecf8427e. A 40 GB video gives another 32 characters. The digest tells you nothing about how big the input was, which is the point of a hash and also the reason a hash is not compression.

The four groups of eight in each lane are a display choice, not part of the format. Splitting the digest that way makes it easier to read against a printed checksum by eye, since you take eight characters at a time instead of scanning a 32 character run and losing your place.

Why one changed bit rewrites the entire digest

Put a word in lane A, then press the button that copies it into lane B with one bit changed. Roughly half of the 128 output bits change with it, and the note under the lanes counts exactly how many. That behaviour has a name, the avalanche effect, and it comes out of the way each round feeds its result into the next.

This is what makes MD5 useful against accidents. A single flipped bit on a failing drive, one dropped byte in a transfer, a truncated last block: none of those produce a digest that is close to the right one. There is no near miss. Either the 32 characters match or they look like an unrelated value, so a partial comparison of the first six characters is nearly as telling as the full string.

The part that is actually broken

People throw around the word broken as if a hash fails all at once. MD5 did not. Three different questions have three different answers, and mixing them up is where bad advice comes from.

What an attacker with a modern GPU is able to do
AttackGoalStatus today
PreimageGiven a digest, find any input producing itNo practical attack. The best published result sits near 2123 operations, which is out of reach.
Second preimageGiven one file, find a different file with the same digestNo practical attack against an arbitrary file you did not prepare in advance.
CollisionFind any two inputs sharing a digestSeconds on a laptop. Public tools have done this since 2004.
Chosen prefix collisionStart from two documents you picked, then append blocks until they collideTook a cluster of 200 games consoles in 2008. Runs on one GPU in hours now.

The two rows at the bottom are what killed MD5 for signatures and certificates. The two at the top are why a digest still identifies a file you already hold.

That table explains an odd sounding fact: MD5 is broken, and nobody is able to work out your password from an MD5 digest by inverting the algorithm. What they do instead is guess. A single high end GPU works through more than a hundred billion MD5 guesses a second, so every password in any leaked wordlist falls in the time it takes to read this paragraph. The weakness there is speed, not the collision result, and it is why password storage wants a deliberately slow function like bcrypt or Argon2 rather than any general purpose hash.

Collisions did real damage twice. At the 25th Chaos Communication Congress in 2008, researchers used a chosen prefix collision to mint a certificate authority certificate that browsers trusted, letting them sign any site they liked. In 2012 the Flame malware forged a Microsoft code signing certificate the same way and rode Windows Update into target networks.

Both attacks needed a system that treated an MD5 match as proof of identity. Neither needed to reverse a single hash.

Why two lanes instead of one box

The usual verification workflow is worse than people admit. You hash your download, you find the checksum on the project page, and then you squint at 32 characters twice. Most people check the first four and the last four and call it done, which is exactly the shortcut a chosen prefix attack is built to slip past.

Both lanes take the same three sources, so the comparison you need is whichever pair you load. Drop your download in lane A and paste the published checksum into lane B for a normal verification. Put a file in each lane to check that a copy survived a transfer. Put text in both to see how one changed character moves the digest.

Whatever the pair, the comparison runs across all 32 characters and marks the ones that drifted in red. A mismatch reports how many characters and how many of the 128 bits differ, which is a signal in itself. One or two characters almost always means a typo in the paste. A digest differing nearly everywhere means genuinely different bytes.

The checksum lane also catches the most common mistake in verification, which is comparing against the wrong algorithm. Paste a 64 character value and the lane names it as SHA-256 rather than reporting a failed match, because a length mismatch is not evidence of a bad download. Whole lines from an md5sums file paste in cleanly too, since the filename after the digest is stripped before comparing.

Hashing a file without sending it anywhere

Each lane reads through a FileReader in 4 MB slices, feeding each slice into the hash state before asking for the next one. Memory stays flat whether the file is 2 MB or 20 GB, because the whole thing is never held at once. Throughput comes from your disk, and the progress line reports the rate it is achieving. Both lanes hash independently, so two large files run at the same time.

Nothing is uploaded. There is no network request in the hashing path at all, so an air gapped machine or a browser with the tab offline behaves identically. That matters for the files people most often want to checksum, which tend to be disk images, database dumps and backup archives that have no business crossing a network for a fingerprint.

The MD5 implementation is written into the page script rather than pulled from a CDN, so there is no third party origin involved in the result either.

Where MD5 still earns its place

What this generator will not do

No reverse lookup. There is no rainbow table behind the page and no way to recover an input from a digest. Sites offering that are querying a database of already computed common strings, which works on password123 and on nothing you would care about protecting.

Text and files hash differently, and the difference trips people up constantly. Typing abc here hashes three bytes. Running echo "abc" | md5sum hashes four, because the shell adds a newline. Files saved by an editor often carry a trailing newline or a UTF-8 byte order mark, and both change the digest completely. When a file hash and a text hash disagree, that invisible byte is the first thing to check.

No keyed hashing here. Attaching a secret to a message needs HMAC rather than a hash of the secret glued to the message, since the second approach is extendable by anyone holding the digest.

The copy and bit flip buttons work on text only. Cloning a file across lanes would mean reading every byte a second time, which is not worth the wait on a large archive, and the point of two file lanes is comparing two different files anyway.

Two inputs at a time, by design. Hashing a whole folder belongs in a shell loop over md5sum, not in a browser tab. If you want several algorithms across the same input in one pass, the Hash Generator Suite covers that, and Checksum Validator handles a list of expected values.

MD5 questions that actually come up

The parts of MD5 hashing that surprise people mid task.

Why does md5sum in my terminal give a different hash for the same text?

Almost always a trailing newline. Running echo "abc" | md5sum hashes four bytes because echo appends a line ending, while typing abc into this page hashes three. Use printf "abc" | md5sum, or echo -n, to drop the newline and the two values line up. A UTF-8 byte order mark at the start of a saved file does the same thing at the other end.

Is MD5 still good enough for checking a download?

It depends on what you are checking against. Against corruption, a dropped byte or a half finished transfer, MD5 is completely reliable and always will be. Against a hostile mirror serving you a modified file, it is not, because an attacker able to alter the file is usually able to alter the checksum next to it. Verification only means something when the digest travels separately from the file, and at that point the digest may as well be SHA-256.

Can an MD5 hash be reversed back to the original text?

Not by inverting the algorithm. The input is compressed to 128 bits, so the information needed to rebuild it is gone. Lookup sites work by guessing instead, hashing enormous lists of common strings and searching for your digest. Short passwords and dictionary words are found in milliseconds. A random 20 character string never will be.

Why do two different files sometimes share an MD5?

By design there are more possible inputs than the 2^128 possible digests, so duplicates exist for any hash. What went wrong with MD5 is that finding a pair stopped requiring the expected effort. A collision runs in seconds on ordinary hardware, which is why an MD5 match is no longer evidence that two files are identical when somebody had a reason to make them collide.

How large a file will this page handle?

The file is read in 4 MB slices, so memory use stays flat and multi gigabyte images work on a desktop browser. Speed is bounded by disk read rate, roughly a minute per few gigabytes on a typical SSD. Mobile browsers are the real limit, since they drop background tabs aggressively and a long hash on a phone often dies partway through.

Should I move existing MD5 checksums to SHA-256?

For anything security related, yes, and SHA-256 costs little more to compute. For internal dedup keys, cache keys and integrity checks against corruption, a migration buys you nothing and touches every stored value. Judge it by the question the hash answers: if a wrong answer only happens by accident, MD5 is doing its job.

Does the case of the letters change anything?

No. Hexadecimal is case insensitive, so d41d8cd9 and D41D8CD9 are the same value. RFC 1321 and the md5sum command both print lowercase, while some Windows tools and older documentation print uppercase. The comparison field here normalises both sides before checking, so a case mismatch never shows up as a failed verification.

Is MD5 encryption?

No, and the difference matters. Encryption is reversible with a key, since the point is getting the data back. Hashing throws information away on purpose and has no key and no way back. If somebody asks you to md5 encrypt a value, they either mean hash it or they mean encryption, and those need entirely different tools.