MD5 File Documentation


Summary

An MD5 checksum file is a small plain-text file holding a 32-character hexadecimal fingerprint used to verify that another file (an ISO, a download, a backup) arrived intact. You don’t read it — you use it: compute the MD5 of your file and check it matches the value inside. On Windows run certutil -hashfile file.iso MD5; on macOS or Linux run md5sum -c file.md5. The digest comes from the MD5 algorithm (RFC 1321, 1992). Its MIME type is text/plain.

Technical details

FeatureValue
Full nameMD5 checksum file
File extension.md5
MIME typetext/plain
Format typePlain-text hash digest (one line per file)
AlgorithmMD5 (Message-Digest 5)
Algorithm authorRonald Rivest (RSA / MIT)
SpecificationRFC 1321 (April 1992)
Digest size128 bits (16 bytes) = 32 hex characters
Line format<32-hex>  filename (two spaces, or  * for binary mode)
Magic numberNone — plain ASCII text
ConventionGNU coreutils md5sum output format
Verify (Windows)certutil -hashfile file MD5
Verify (Mac/Linux)md5sum -c file.md5 / md5 file
Security statusCryptographically broken — corruption checks only
Related extensions.sha256, .sha1, .sfv, .asc

What is an MD5 file?

A .md5 file is a checksum sidecar: a small plain-text companion distributed alongside a larger file so you can confirm the larger file’s integrity. It contains the output of the MD5 algorithm (Message-Digest 5), designed by Ronald Rivest and published as RFC 1321 in April 1992. MD5 reduces any input, of any size, to a fixed 128-bit (16-byte) value, written as 32 hexadecimal characters. Re-running MD5 on the same bytes always produces the same digest, so if the hash you compute from a download equals the one in the .md5 file, the download arrived without corruption.

The .md5 file is not a format with a header, a magic number, or an internal structure to parse. It is ASCII text, and it holds the fingerprint of a file, not the file itself — you cannot reconstruct anything from it, because a hash is one-way. This page therefore explains the line format, the exact commands to verify with, and the important caveat that MD5 is broken for security use.

The line format

Each line of a .md5 file records one file’s digest. The layout follows the GNU coreutils md5sum convention: the 32-character lowercase hex digest, a separator, then the filename the hash belongs to.

d41d8cd98f00b204e9800998ecf8427e  empty.txt
c4ca4238a0b923820dcc509a6f75849b  one.bin
1a79a4d60de6718e8e5b326e338ae533 *example.iso

The separator is two spaces for text mode, or a space followed by an asterisk ( *) for binary mode — the asterisk tells md5sum the file was hashed as raw bytes rather than with any text translation. A .md5 covering several files simply has one such line per file. The value d41d8cd98f00b204e9800998ecf8427e above is worth recognising: it is the MD5 of zero bytes, the digest of an empty file, so seeing it means the hashed file was empty.

Verifying a file against its .md5

You do not open a .md5 to read it, you use it. The workflow is always two steps: compute the hash of the file you have, then compare it to the value in the .md5. Every desktop OS ships a tool for the first step.

Windows (Command Prompt):
   certutil -hashfile example.iso MD5

Windows (PowerShell):
   Get-FileHash example.iso -Algorithm MD5

macOS:
   md5 example.iso

Linux / macOS with coreutils:
   md5sum -c example.md5   # reads the .md5 and reports OK / FAILED

On Windows, certutil -hashfile and PowerShell’s Get-FileHash print the computed digest, which you eyeball against the .md5 contents. On Linux, md5sum -c file.md5 does both steps at once: run in the folder containing the files, it re-hashes each listed file and prints OK or FAILED per line. A match means the bytes are identical to the original; a mismatch means your copy differs — almost always a truncated or corrupted download, so re-download it.

Why MD5 is only a corruption check

MD5 reliably detects accidental change, but it is cryptographically broken for detecting deliberate change. Researchers can construct collisions — two different inputs with the same MD5 digest — on demand, and practical collision attacks have existed since 2004–2008. That means a matching MD5 does not prove a file was not maliciously replaced: an attacker who can supply both the file and its published hash can make a tampered file hash to the expected value. Consequently, MD5 should be used only to catch transmission errors, not as a trust signal.

For trust-critical verification, projects now publish SHA-256 (a .sha256 sidecar) and a detached GPG/PGP signature over the checksum file, so the fingerprint itself is signed by the publisher’s key. It is also important where the published hash comes from: fetch it over HTTPS from the project’s own site, not from the same mirror that served the download, so a compromised mirror cannot serve a matching bad file and hash together. See also the related SHA-256 and SFV (CRC-32) checksum formats.

A hash cannot be converted or edited

Because a digest is a one-way fingerprint, there is nothing to convert. You cannot turn an .md5 into a .sha256: the .md5 holds no information about the original file’s bytes, only their MD5 value, so to get a SHA-256 you must re-hash the original file with the SHA-256 algorithm (certutil -hashfile file SHA256). Likewise an .md5 cannot become an .sfv, which stores CRC-32 values from a different algorithm. And there is no point “converting” it to .txt, because a .md5 is already plain text — renaming it changes only the extension. The file is a reference value, not editable data.

Frequently asked questions

How do I open an MD5 file?

You verify with it rather than open it. Compute your file’s MD5 (Windows: certutil -hashfile yourfile MD5; macOS/Linux: md5 or md5sum) and check the result equals the value inside the .md5. A text editor will show the expected hash, but seeing it does not verify anything on its own.

The hashes don’t match — what does that mean?

Your copy is not byte-identical to the original. Almost always that is a corrupted or incomplete download, so re-download the file and check again. In rare cases it can mean the file was altered; either way, do not use a file whose checksum fails.

Is MD5 secure?

No, not for security. MD5 collisions can be produced deliberately, so a matching MD5 does not prove a file is authentic. Use it only to catch accidental corruption, and rely on SHA-256 plus a publisher’s signature when you need to prove a file was not tampered with.

References