I need to check the MD5 of a few files on Windows. Any recommendations on either a command line or an explorer-plugin utility?
10 Answers
There's a built-in PowerShell tool:
CertUtil -hashfile yourFileName MD5
The following rules are as of Windows 7 SP1, Windows Server 2012, and beyond. If they are known to work in older versions, they will be noted with: (independent of Windows version)
You will need to open a Command Prompt OR Powershell to run this command
** a quick guide to open CMD/Powershell is at the bottom of the answerYou can find the checksum for a file using ANY of the following hashing algorithms, not JUST MD5:
MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512
To get the current list of supported Hash Algorithms on your specific windows machine (independent of Windows version), run
CertUtil -hashfile -?
The full Format is below, optional parameters are in braces - just replace [HashAlgorithm] with your desired hash from above:
CertUtil -hashfile InFile [HashAlgorithm]
You can do the command line operation for ANY files, whether they provide a certificate or not (independent of Windows version)
If you leave off the [HashAlgorithm], it will default to the SHA1 checksum of your chosen file
Its HELPFUL to note that [HashAlgorithm] is case INsensitive in both CMD and Powershell meaning you can do any of the following (for example):
CertUtil -hashfile md5 certutil -hashfile MD5 CertUtil -hashfile sHa1 certutil -hashfile SHA256
Quick: How to Open Command Prompt or Powershell
In case you do not know how to open the Command Prompt or Powershell and you got here by search engine, the following is a quick guide that will work for Windows XP and beyond:
- Press [Windows]+[R]
- Then, type cmd (or powershell if Windows 8+)
- Press [OK] or hit enter

- 268
- 6
- 18

- 1,141
- 1
- 7
- 5
-
9The good thing about this one is that it's built in. – GuitarPicker Jul 16 '15 at 13:05
-
3Note that the MD5 at the end is case-sensitive – GlennFromIowa Jan 12 '16 at 18:38
-
Get-FileHash {filename} -Algorithm MD5 is way faster for some reason. – Mark Khateeb Jun 16 '20 at 13:29
-
How do I get the hashes of all files in folder? Or even sub folders? – Macindows Sep 17 '20 at 08:45
-
i just tested working good. ty – Furkan Gözükara Jun 20 '21 at 00:30
-
@GlennFromIowa See: *Note that the MD5 at the end is case-sensitive*, **true**, but does not apply to all (current/supported) Windows versions. – It Wasn't Me Sep 02 '23 at 16:12
Open a powershell window and try the following command:
Get-FileHash {filename} -Algorithm MD5
Substituting {filename} with the path to your file, e.g.
Get-FileHash c:\example.txt -Algorithm MD5
More information on this can be found in the docs for Get-FileHash.

- 8,811
- 21
- 32
- 47

- 161
- 1
- 2
-
-
The above is a powershell command, open a powershell window and substitute the {filename} section with the path to your file. – Alex Berry Mar 22 '18 at 12:03
For the right-click Explorer shell extension option, I use Nirsoft's HashMyFiles.

- 496
- 3
- 11
-
It also does have limited command line options, documented on the linked page. – hyperslug Aug 23 '09 at 04:19
This is I think the same one as is available on most unix systems and couldn't be easier to use from the command line.

- 171
- 2
+1 on the FCIV. A lot of the google results for when I searched this issue had a lot of third party tools showing up in results, likely because at the time that is all that was available.
MS themselves have developed an "unsupported" tool FCIV and this is what I'd recommend you use, especially if you're a linux/unix guy and used to command line md5 checking
link here:
http://www.microsoft.com/en-us/download/details.aspx?id=11533
my screenshot here:
http://geekswing.com/wp-content/uploads/2014/04/windows_md5sum_sha1_example.jpg

- 101
- 5
-
That works for me, however, I used this download page https://support.microsoft.com/en-us/help/841290/availability-and-description-of-the-file-checksum-integrity-verifier-utility – Mr. Raspberry Jun 01 '17 at 19:06
I always install HashCheck. It integrates in the properties Dialog of the Explorer.

- 23,274
- 8
- 57
- 89
-
Love it! I'm half of a mind of changing the accepted answer, except a command line utility is more flexible generally speaking. – Daniel C. Sobral Jul 16 '15 at 16:42
I use md5deep as it has several practical usability advantages over most of the others listed.
For one it has SHA1 and SHA256 executables in the same package, it also automatically handles directory recursion and it has a matching mode where it will validate that your files are as you left them. And it's a native Windows package so there is no need to install Cygwin if you don't really need it.
Single file: Look the answer below me.
All .jpg
files in current directory:
forfiles /s /m *.jpg /c "cmd /c CertUtil -hashfile @path MD5"

- 126
- 4
I install cygwin on all my Windows systems, then I use openssl's built in md5 command.

- 1,859
- 2
- 17
- 23
-
I love cygwin, especially as a linux guy. Having all the utilities handy is a bonus. The downside of cygwin: it takes a while to install, and unless you are a linux user, the install can be a bit complicated. Even as a linux user, it can be complicated. Taking the default install on cygwin still takes quite a few steps. For windows users that are more used to downloading a patch from MS and running it, FCIV is faster and easy to use. So specifically just for windows users, I still recommend FCIV. For linux users on windows, definitely agree on cygwin – ben Jun 09 '14 at 17:14