How to check MD5 Checksum or Hash of a file on Windows using command line

Hash is essentially a digital signature-based encryption system used for checking the integrity of a file. There are numerous hash checksum algorithm formats including MD5, LM, SHA1, SHA256, SFC, CRC, etc. There are many hash checker programs and online tools that will allow you to check the MD5 checksum or the hash of the file. In this article, you’ll get to know how you can check the MD5 checksum or hash of a file using a command-line prompt

What is the purpose of hashes and checksums?

The purposes of checksum or hash codes are essentially the same. Both of them are used for ensuring the integrity of a file using an alphanumeric string. In case the uploader of the file has provided the hash for the uploaded file, you’ll be able to easily verify it. Once you’ve downloaded the file, you can use the MD5 checksum or hash checker utility for comparing the hash signature of the original file to your copy of the file. If the signatures do not match, it’ll mean that the file might have been corrupted.

Supposed an unauthorized person has modified the original file or the file has been corrupted due to a bad download, the checksum value will change. The reason why the file might have been corrupted could be due to a network issue during the downloading process, storing the file on a faulty storage drive, or an error has crept in during copying or moving.

How to check MD5 checksum or hash value using command line

check MD5 Checksum or Hash of a file on Windows using command line

You can easily check the hash code or MD5 checksum value of any file on your Windows 10 PC using the command line function.

  1. Navigate to the path where the file is located. In most cases, it’ll either be on the desktop or in the downloads folder.
  2. Press the Shift key on your keyboard and then right-click on the mouse. Choose the Open PowerShell window here option from the context menu. Launch the command window from the file location. Using this option, you won’t have to add the full path of the file but only the file name.
  3. Once the command prompt window is launched, you should execute the following command for finding the hash value or MD5 checksum of the file
get-filehash filename
  1. Keep in mind that you’ll see the SHA256 hash value of the file by default.
  2. if you want to see the hash value for any other hash algorithm type, you need to use the following command
get-filehash –Algorithm [hash-type] filename
  1. If you want to get the MD5 checksum of the file, you should simply use the command
get-filehash –Algorithm MD5
  1. That’s it, you’ve checked the MD5 checksum on your Windows 10 PC via a command line

Aviral Sharma
Aviral Sharma
Android Expert
Aviral Sharma is a talented and passionate writer who has been using words to express his thoughts ever since he learned how to hold a pen. He is passionate about outer space, history, sports, and most importantly, technology. Aviral has been a regular writer for rootmygalaxy for over 6 years and has been covering games and Android guides. He currently owns a Samsung Galaxy S24 Ultra, an iPhone 13, and a HP Pavilion laptop.

Leave a Comment