How-To Guide

    md5sum on Windows: How to Get an MD5 Checksum

    Windows has no md5sum, but two built-in commands do the same job. Here are the exact equivalents for CMD and PowerShell, how to run the real md5sum, and how to check a .md5 file.

    Published November 14, 2026Updated November 14, 20267 min read
    Mehrab Ali

    Author

    Mehrab Ali

    Founder & Executive Lead, ARCED International

    Founder of ARCED Foundation, ARCED International, and Solutions of Things Lab (SoTLab). Built FolderManifest to help teams protect file integrity and stay audit-ready.

    Quick Answer

    Windows does not include md5sum. The built-in equivalents are certutil -hashfile file.iso MD5 in Command Prompt and Get-FileHash file.iso -Algorithm MD5 in PowerShell. Both work on Windows 10 and 11 with nothing to install. For the real md5sum, including md5sum -c, use Git Bash or WSL.

    Every command below was run on Windows 11 with Windows PowerShell 5.1 and Git for Windows. All of them produce the same 32-character hash for the same file, so pick whichever shell you already have open.

    md5sum Equivalents on Windows at a Glance

    Linux commandWindows CMDWindows PowerShell
    md5sum filecertutil -hashfile file MD5Get-FileHash file -Algorithm MD5
    sha1sum filecertutil -hashfile file SHA1Get-FileHash file -Algorithm SHA1
    sha256sum filecertutil -hashfile file SHA256Get-FileHash file
    sha512sum filecertutil -hashfile file SHA512Get-FileHash file -Algorithm SHA512
    md5sum -c sums.md5No built-in equivalentShort loop (see below)

    Command Prompt: certutil -hashfile

    Open the folder in File Explorer, type cmd in the address bar, press Enter, then run:

    certutil -hashfile "file.iso" MD5

    The output is three lines, with the hash in the middle:

    MD5 hash of file.iso:
    af5597c29467a96523a70787c319f4db
    CertUtil: -hashfile command completed successfully.

    Unlike md5sum, certutil takes one file at a time and wraps the hash in extra text. To get bare hashes for every file in a folder, loop over them and filter out the two wrapper lines:

    :: Hash only, one line per file (type at the prompt;
    :: in a .bat file write %%F instead of %F)
    for %F in (*) do @certutil -hashfile "%F" MD5 | findstr /v /c:"hash of" /c:"CertUtil"

    The algorithm name goes last and defaults to SHA1 if you leave it off, so always type MD5. For the output quirks and a one-line pass/fail check with findstr, see our certutil checksum guide.

    PowerShell: Get-FileHash -Algorithm MD5

    # One file
    Get-FileHash .\file.iso -Algorithm MD5
    
    # Just the hash string
    (Get-FileHash .\file.iso -Algorithm MD5).Hash
    
    # Compare with a published MD5: prints True or False
    (Get-FileHash .\file.iso -Algorithm MD5).Hash -eq 'af5597c29467a96523a70787c319f4db'
    
    # Every file in the current folder
    Get-ChildItem -File | Get-FileHash -Algorithm MD5

    Get-FileHash prints the hash in uppercase; md5sum and certutil print lowercase. PowerShell's -eq ignores case, so the comparison above works either way. If you leave off -Algorithm, you get SHA-256, not MD5.

    Want to type md5sum and have it work? Add this function to your PowerShell profile. It prints the same hash, two spaces, file name lines as the Linux command:

    function md5sum {
      Get-FileHash -Algorithm MD5 -Path $args |
        ForEach-Object { '{0}  {1}' -f $_.Hash.ToLower(), (Split-Path $_.Path -Leaf) }
    }
    
    md5sum .\setup.exe .\notes.txt
    md5sum *.iso

    More on hashing and comparing files from PowerShell is in our Get-FileHash guide.

    Run the Real md5sum on Windows (Git Bash or WSL)

    If you want the actual GNU tool, with the same flags and output as Linux, you may already have it:

    • Git for Windows. Git Bash includes md5sum, sha1sum, sha256sum, and sha512sum. Open Git Bash, cd to the folder, and run md5sum file.iso. The programs live in C:\Program Files\Git\usr\bin on a default install, so you can also call md5sum.exe from CMD or PowerShell by full path.
    • WSL. With a Linux distribution installed, run wsl md5sum file.iso from CMD or PowerShell in the file's folder. WSL maps the current Windows folder for you.
    $ md5sum setup.exe notes.txt
    af5597c29467a96523a70787c319f4db *setup.exe
    2d0ad13571bf807a3bdcfacc0d5d65f1 *notes.txt

    The * before each name in Git Bash only marks that the file was read in binary mode. It is not part of the file name, and md5sum -c on Linux accepts lines written this way.

    Verify a .md5 File on Windows (md5sum -c Equivalent)

    Publishers often ship a file such as MD5SUMS or checksums.md5, where each line is a hash followed by a file name. On Linux you check everything at once with md5sum -c. In Git Bash the same command works:

    $ md5sum -c checksums.md5
    setup.exe: OK
    notes.txt: OK

    Without Git Bash, this PowerShell loop does the same job using only built-in commands:

    Get-Content .\checksums.md5 | ForEach-Object {
      $hash, $name = $_ -split '\s+', 2
      $name = $name.TrimStart('*')
      if ((Get-FileHash -LiteralPath $name -Algorithm MD5).Hash -eq $hash) { "${name}: OK" } else { "${name}: FAILED" }
    }

    Run it from the folder that holds both the .md5 file and the files it lists. It splits each line at the first run of spaces, so file names that contain spaces still work. For a SHA-256 list, change MD5 to SHA256.

    Create an md5sum-Style Checksum List on Windows

    To hand someone a checksum file they can verify with md5sum -c on Linux or macOS, write lowercase hashes, two spaces, and the file name:

    $lines = Get-ChildItem -File | ForEach-Object {
      '{0}  {1}' -f (Get-FileHash -LiteralPath $_.FullName -Algorithm MD5).Hash.ToLower(), $_.Name
    }
    [IO.File]::WriteAllText("$PWD\checksums.md5", ($lines -join "`n") + "`n")

    Why not just use Set-Content or >?

    Both write Windows line endings (CRLF). md5sum -c then treats the invisible carriage return as part of each file name and reports No such file or directory for every line. The WriteAllText call above writes Unix line endings, which md5sum reads correctly. Run it once per folder: a second run would include checksums.md5 itself in the list.

    sha256sum on Windows

    Everything above works for SHA-256 by swapping the algorithm name. Most downloads now publish SHA-256 instead of MD5, and you should prefer it when both are offered.

    :: Command Prompt
    certutil -hashfile "file.iso" SHA256
    
    # PowerShell (SHA-256 is the default)
    Get-FileHash .\file.iso
    
    # Git Bash or WSL
    sha256sum file.iso
    sha256sum -c SHA256SUMS

    MD5 still catches accidental damage such as a truncated download, but it cannot prove a file was not deliberately altered. See MD5 vs SHA-256 for when the difference matters, or the MD5 hash checker page for Mac and Linux commands.

    Checking a Whole Folder, Not One File

    md5sum and its Windows stand-ins answer one question: does this file match that hash? When you copy a project to a new drive or restore a backup, the question is bigger. Which files are missing, which are extra, and which changed? A flat checksum list will not tell you about a file that never made it across unless you write more script around it.

    FolderManifest records every file in a folder with its path, size, dates, and SHA-256 hash, then compares a second folder or a later scan against that record and reports what was added, removed, or changed. It runs locally on Windows 10/11, macOS, and Linux. It uses SHA-256, not MD5, so it does not replace md5sum when a publisher only lists an MD5.

    You may not need it

    To check one download against a published hash, certutil or Get-FileHash is all you need. A manifest is worth it when you have to confirm that thousands of files arrived intact, or re-check the same folder later.

    Frequently Asked Questions

    Does Windows have an md5sum command?

    No. md5sum is a GNU coreutils program and is not part of Windows 10 or 11. Windows ships two built-in equivalents instead: certutil -hashfile file MD5 in Command Prompt and Get-FileHash file -Algorithm MD5 in PowerShell. If Git for Windows or WSL is installed, you also have the real md5sum.

    What is the md5sum equivalent in Windows CMD?

    certutil -hashfile "C:\path\file.iso" MD5. It prints a header line, the 32-character MD5 hash, and a completion message. certutil is included with Windows, so there is nothing to install.

    How do I run md5sum -c on Windows?

    With Git for Windows installed, open Git Bash in the folder and run md5sum -c checksums.md5. Without it, use the short PowerShell loop in this guide: it reads each line of the .md5 file, hashes the named file with Get-FileHash, and prints OK or FAILED.

    What is the sha256sum equivalent on Windows?

    certutil -hashfile file.iso SHA256 in Command Prompt, or Get-FileHash file.iso in PowerShell (SHA-256 is its default algorithm). Git Bash and WSL also include the real sha256sum, including sha256sum -c.

    Why is my Windows hash uppercase when the website shows lowercase?

    Get-FileHash prints uppercase hex, while md5sum and certutil print lowercase. An MD5 hash is a hexadecimal number, so case does not matter: compare the characters. If the characters themselves differ, the file is not the same as the original.

    Is MD5 still safe for checking files?

    MD5 is fine for catching accidental corruption, such as a broken download or a bad copy. It is not safe against tampering, because two different files can be crafted to share an MD5. When the publisher offers a SHA-256 hash, use that instead.

    Verify a Whole Folder, Not Just One File

    Record every file with its SHA-256 hash, then check any copy or backup against it. Windows, Mac, and Linux. 7-day free trial, no card required, 30-day money-back guarantee.

    Continue Learning