Check an MD5 file checksum on Windows

Use PowerShell to calculate MD5 from a real file, compare only the hash, and troubleshoot paths and byte differences.

Start with a trusted expected value

A download page may publish an MD5 checksum next to an artifact. Confirm the algorithm and file version before calculating anything. Keep the expected value from a trustworthy publisher; downloading a file and its checksum from an untrusted mirror does not establish authenticity. If the publisher supplies SHA-256 instead, select SHA-256 rather than trying to turn one digest into the other.

Calculate the file in PowerShell

Open PowerShell and run the following with the path replaced by your actual local file. LiteralPath treats square brackets and other wildcard-looking characters as part of the filename. Quotes keep a path containing spaces together.

Get-FileHash -LiteralPath 'C:\Downloads\example.zip' -Algorithm MD5

Read the Hash field, not the Path column. MD5 is not the command's default algorithm, so keep the explicit option. Uppercase letters in PowerShell and lowercase letters in a browser represent the same hexadecimal bytes.

Compare the complete 32 characters

For a controlled fixture, create a UTF-8 file containing exactly abc and no final newline. Its MD5 is 900150983cd24fb0d6963f7d28e17f72. An editor that adds a newline or a byte-order mark changes the bytes and therefore the result. This fixture is for checking the procedure, not an expected value for your own download.

Choose the same saved file in the browser file tool, select MD5, and paste only the 32-character expected hash into comparison. Do not paste a full terminal line, an algorithm prefix or the filename. The tool accepts surrounding pasted whitespace and case differences, but internal spaces are rejected.

Diagnose a mismatch without editing the download

Verify that the file has finished downloading, that it is the intended release and that you have not compared an extracted folder with its archive. A renamed file keeps the same content hash, while a recompressed archive generally does not. A browser error or cancelled calculation is not the same as a completed mismatch.

Do not modify the file merely to force a match. Obtain a fresh copy from the publisher if the expected bytes cannot be confirmed. For malicious-modification resistance, follow the publisher's signature-verification instructions or use its authenticated modern hash. MD5 alone is not a security certificate.

Browser and command-line roles

The browser is useful for a small local queue and a visible comparison. PowerShell is useful for automation and files beyond the browser's safeguards. Neither method should upload a file just to calculate its local checksum. The browser tool limits a file to 1 GiB; your system and command-line environment have their own practical limits.

Microsoft Get-FileHash

Frequently asked questions

Do I need to specify MD5 in Get-FileHash?

Yes. Keep -Algorithm MD5 when reproducing an MD5 reference; the command defaults to SHA-256. Replace the sample path with the saved file you actually want to verify.

Does uppercase PowerShell output differ from lowercase output?

No. Hexadecimal letter case does not change the digest bytes. Compare all 32 MD5 characters without the filename or other command-output fields.

Other hash & checksum tools