Guides/Files
How to check a SHA-256 checksum in Windows 11
Open Terminal (PowerShell) and run Get-FileHash "C:\path\to\file". It prints the file's SHA-256, which is the default algorithm. Compare that value with the one on the publisher's download page: if every character is the same, the file is exactly the one that checksum was made for. In Command Prompt the same check is certutil -hashfile "C:\path\to\file" SHA256. Nothing needs to be installed, and neither command needs administrator rights.
What you are checking
A checksum, or hash, is a short value computed from every byte of a file. Changing even a single character in a file changes its hash, and if two files have the same hash, their contents are identical. A publisher puts the SHA-256 of a download on its site so you can compute the same thing at home and compare.
You need two things: the file, and the publisher’s value. The value is usually on the download page, on the release page, or in a small text file with a name like SHA256SUMS.
The same steps work in Windows 10. certutil is the same command there, and Get-FileHash is part of Windows PowerShell 5.1 as well as PowerShell 7.
Check it in PowerShell
Open Terminal or Windows PowerShell and run this with your own path:
Get-FileHash "C:\Users\You\Downloads\example.iso"
The output has three columns: Algorithm, Hash and Path. With no algorithm named, Get-FileHash uses SHA256. A big file takes a little while, since the whole file is read.
To see the whole hash on a line of its own, which is easier to compare and copy:
Get-FileHash "C:\Users\You\Downloads\example.iso" | Format-List
Let PowerShell compare
Comparing 64 characters by eye is where mistakes happen. Paste the publisher’s value between the quotes and let PowerShell answer:
(Get-FileHash "C:\Users\You\Downloads\example.iso").Hash -eq "PASTE-THE-PUBLISHED-VALUE-HERE"
It prints True when they are the same and False when they are not. Uppercase and lowercase do not matter: -eq compares strings without regard to case. Make sure you pasted nothing but the hash: a stray space inside the quotes gives False.
To compare a copy with its original instead of with a published value, hash both files and compare the two results.
Other algorithms
If the publisher gives another kind of checksum, name it:
Get-FileHash "C:\Users\You\Downloads\example.iso" -Algorithm SHA512
Accepted values include SHA1, SHA256, SHA384, SHA512 and MD5. MD5 and SHA1 are no longer considered secure and should only be used for simple change validation: fine for spotting a broken download, not for trusting a file someone may have tampered with.
Check it in Command Prompt
If you prefer Command Prompt, certutil is part of Windows and does the same job:
certutil -hashfile "C:\Users\You\Downloads\example.iso" SHA256
It prints the hash on its own line, in lowercase. Always type the algorithm at the end, so there is no doubt about which hash you got. Compare the line with the published value.
Reading a SHA256SUMS file
Many projects publish one text file with the hashes of all their downloads. Usually each line holds a hash and then a file name. Open it in Notepad, find the line with your file’s name, and use the hash on that line as the published value in the compare above.
What a match proves, and what it does not
A match means your file is, byte for byte, the file that checksum was computed from. A download that was cut short or damaged on the way will not match.
What it does not tell you:
- That the file is harmless. A checksum is not a virus scan.
- Who made the file. If someone can replace the download on a site, they can often replace the checksum next to it too. The check is only as good as the place the value came from. A value from the publisher’s own HTTPS site is better than one from a mirror or a forum.
For a stronger answer to “who made it”, publishers sign their files. See how to check a program’s digital signature in Windows.
If it does not match
Do not run the file. Check first that you compared with the value for exactly this file and version, and that you used the same algorithm. Then download it again from the publisher’s own site and check again. If it still does not match, tell the publisher.
With VibeVerify
VibeVerify is our free, open-source app for this check, currently a preview. It does the same computation and takes the comparing off your hands:
- Drop the file on the window, copy the published hash and press Ctrl+V. The verdict says Match or Does not match, and how many characters differ.
- A checksum file lying next to the download, such as SHA256SUMS, is found and used without pasting. Drop the checksum file itself to check every file it lists.
- It says how far a match goes. A match by MD5 or SHA-1, or against an unsigned checksum file from the same place as the download, is reported as Intact and not as verified.
- It also shows the file’s Windows code signature and where it was downloaded from.
It does not scan for viruses, and it sends no file and no hash anywhere.
Questions people ask
How do I check a SHA-256 checksum in Windows 11 from the command line?
In PowerShell: Get-FileHash followed by the file's path. In Command Prompt: certutil -hashfile, the file's path, then SHA256. Both print the hash, and you compare it with the published one.
How do I verify an MD5 checksum in Windows?
Add the algorithm: Get-FileHash with -Algorithm MD5, or certutil -hashfile with MD5 at the end. Microsoft notes that MD5 and SHA1 are no longer considered secure and should only be used for simple change validation, so prefer SHA-256 when the publisher offers it.
What is a checksum mismatch?
The hash you computed differs from the published one. The file is not the one that value was made for: the download may be incomplete or damaged, you may be comparing with the value for another version, or the file was changed. Do not run it. Download it again from the publisher's own site and check again.
Does it matter if the letters are uppercase or lowercase?
No. Get-FileHash prints uppercase and many sites publish lowercase. The value is the same. PowerShell string comparisons with -eq are case-insensitive, so the compare on this page treats them as equal.
Does a matching SHA-256 mean the file is safe?
No. It means the file is identical to the one the checksum was made for. If that file was harmful, so is yours. A checksum is not a virus scan.
Sources
VibeWare is not affiliated with Microsoft. What this page says about them comes from their own pages, linked above.
Published · by Ted K. Johansen, who also makes VibeVerify
Is this file the one you meant to get? Hashes, signatures and certificate files. Free and open source, for Windows. No account, no ads, no telemetry.
VibeVerify is made by Ted K. Johansen, who wrote this guide.