Skip to the tool
DevToolBench

MD5 Generator

MD5 of text or a file, with a checksum comparison.

0 chars

MD5 is broken for collisions: anyone can craft two different files with the same digest. Use it to spot accidental corruption, never for passwords, signatures or anything an attacker could forge.

Everything runs in your browser. Nothing you type is sent to a server.

Found a bug in this tool? Report it.

Share this tool

What this tool does

This MD5 generator computes the MD5 digest of whatever you type, live, as 32 hexadecimal characters. It also hashes a file you pick from your disk, and compares either result against the MD5 checksum a download page gave you. Think of it as an md5 hash online that never actually goes online: the algorithm runs as JavaScript inside this tab, so neither the text nor the file is sent anywhere.

Browsers leave MD5 out of their built-in crypto API on purpose, so the implementation here is a direct transcription of RFC 1321 — the four rounds of sixteen steps, the sine-derived constant table and the padding rule — checked against every test vector in the RFC's appendix.

How to use it

  1. Type or paste text into the input box. The digest updates on every keystroke, and even an empty box has one: d41d8cd98f00b204e9800998ecf8427e.
  2. To hash a file instead, pick it with the file field. The file is read locally, and its MD5 appears underneath with its name and size.
  3. Paste a published md5 checksum into the comparison field to see whether it matches. You can paste the whole line from a .md5 file, filename included.
  4. Download saves a .md5 file in the md5sum format, which md5sum -c can verify later.

What MD5 is still good for

MD5 answers one question well: did these bytes change by accident? A download truncated by a flaky connection, a sector gone bad on an old drive, a file mangled by a text-mode FTP transfer — all of them produce a different digest, and MD5 spots them as reliably as anything newer. It is also quick, and it is everywhere: cloud storage ETags, package mirrors, backup tools and database row fingerprints still use it.

What it cannot do is survive someone trying to fool it. Since 2004, researchers have been able to build two different inputs with the same MD5, and today that takes seconds on a laptop. Forged certificates and malware that shares a digest with a harmless file have both happened in the wild. So the rule is simple: MD5 for catching accidents, never for passwords, signatures or proving that nobody tampered with a file.

MD5 vs SHA256

The practical comparison of md5 vs sha256 comes down to who you are defending against. Both detect accidental corruption equally well. Only SHA-256 still resists deliberate collisions, which is why package managers, certificate authorities and Git's newer object format all moved to it. SHA-256 is also longer — 64 hex characters rather than 32 — and on modern processors with SHA extensions it is not meaningfully slower.

If a project publishes both digests, verify the SHA-256. For that, and for SHA-1, SHA-384 and SHA-512, use the hash generator, which computes all four with the browser's own Web Crypto implementation.

When the digest does not match

A mismatch almost always means the input differs by a byte you cannot see. echo appends a newline, editors add a final line break on save, and Windows tools may write \r\n where Unix writes \n. Text encoding is the other trap: this page hashes UTF-8, so café is five bytes, not four. For files, a mismatch after a complete download is worth taking seriously — fetch it again from a different mirror before you open it.

Moving the digest around in another format? The Base64 encoder converts between representations, and the UUID generator is the right tool when you need a unique identifier rather than a fingerprint of some content.

Frequently asked questions

Is MD5 safe for storing passwords?

No, and it has not been for a long time. MD5 is fast by design, so a single consumer GPU tests billions of guesses a second against an unsalted MD5, and rainbow tables for common passwords are a download away. Passwords belong in a slow, salted function such as bcrypt, scrypt or Argon2, running on your server.

If MD5 is broken, why does anyone still publish MD5 checksums?

Because the attack that broke it is a collision attack: someone who controls both files can make them share a digest. That does not help against a file damaged in transit or on a failing disk, which is what most checksums are there to catch. For that non-adversarial job MD5 still works, and a lot of mirrors, backup tools and old release pages never moved on.

Why does my terminal give a different MD5 for the same text?

Nearly always a trailing newline. echo hello piped into md5sum hashes six bytes, because echo adds a line break; printf 'hello' hashes five. The other suspect is encoding: this page hashes the UTF-8 bytes of your text, so a file saved as UTF-16 or latin-1 with the same visible characters produces a different digest.

Is the file I pick uploaded to calculate the hash?

No. The browser reads the file into memory with the FileReader API and the MD5 is computed by JavaScript running in this tab. There is no request to any server, so a private archive or a database dump is as safe here as it would be in md5sum on your own machine.

What is the difference in MD5 vs SHA256 output?

MD5 produces 128 bits, written as 32 hex characters; SHA-256 produces 256 bits, written as 64. Beyond length, SHA-256 has no known practical collision attack, which is why it replaced MD5 for anything security-related. If a project publishes both, check the SHA-256.

Related tools

Updated