How to Check MD5 Checksum and SHA Hash of a File

H

Hash is a digital signature-based encryption system to check the integrity of a file. There are a number of hash checksum algorithm formats including MD5, SHA1, SHA256, SHA384, SHA512, SFV, CRC, Base64, LM, etc. There are some great hash checker programs and online tools using which you can easily check the MD5 checksum or hash of a file. You can also verify the MD5sum using the Windows command line as well. Moreover, we will also check some MD5 or hash generator utilities.

Hashes vs Checksums

The purpose of the hashes or hash codes and checksums is the same. Both are used to ensure the integrity of a file via an alphanumeric string. If the uploader of a file has provided that hash for the uploaded file, you can verify it easily. Once you have downloaded the file, you can use a hash checker or MD5 checksum utility to compare the hash signature of the original file and your copy of the file. If the signatures don’t match, it means your copy of the file may have corrupted or has been compromised.

Suppose some unauthorized person has modified the original file or it has been corrupted due to bad download, the checksum value of the file will change. The reasons due to which a file can get corrupted might be a network issue during a file download, errors that creep in during copying and moving, storing a file on a faulty storage drive.

As for MD5 checksum is a string of hexadecimal string (6 + 10 = 16) that contains 6 alphabets (A to F) and 10 digits (0 to 9). It is made up of 32 characters and looks as shown below:

3D19A66D0CC7DD5938479978FC313C79

0550E1B8D3501A0B9646A7EF2D2CCFFA

MD5 is a 128-bit fingerprint. It’s one of the most popular hash algorithms and because of that, it is also more prone to the hash collision problem. MD5, SHA1, and SHA256 are the most widely used checksums to verify data integrity.

Depending on the encryption type, there are several types of hashing.

  • MD4
  • MD5
  • SHA1
  • SHA2
  • SHA224
  • SHA256
  • SHA384
  • SHA512
  • SHA-512/224
  • SHA-512/256
  • SFV
  • CRC
  • Base64
  • LM
  • Tiger
  • xxHash
  • MACTripleDES
  • RipeMD
  • HAVAL
  • Whirlpool

Now that we have understood what hashing and MD5 mean, it’s time to take a look at the ways to check MD5 checksum and the hash value of a file on Windows 10, macOS, and Linux. An MD5 hash checker can save you from the malicious files. There are several ways to verify the hash value of a file online, hash checker utilities, and even a command line (Windows 10).

Online hash checkers are great but big files can take a lot of time and consume your data file every time you check the hash value. Therefore, it’s a better idea to download an SHA or MD5 checksum utility or tool and install it on your computer.

Check Hash Value using Command Line

MD5Sum Windows Command Line

Windows natively supports the calculation of the hash values or checksums for the following algorithm types: MD5, SHA1, SHA256, SHA384, SHA512, MACTripleDES, and RIPEMD160. You can easily find out the hash code of any file on your Windows 10 PC using a command line.

  1. Navigate to the path where the concerned file is located. In my case, the file is saved on the desktop.
  2. Now, press the Shift key on the keyboard and perform a right-click action on the mouse. Select the Open PowerShell window here option here from the context menu. Launching the command window from the file location is convenient because that way you don’t need to add the full path of the file but the file name only.
  3. When the command prompt window is launched, execute the following command to find out the hash value or MD5 checksum of a file.
    get-filehash filename
  4. Please note that you will get the SHA256 hash value of the file by default.

    hash checker command windows
    SHA256 hash checker command Windows 10

  5. If you want to get the hash value for some other hash algorithm type, you will have to use the following command.
    get-filehash -Algorithm [hash-type] filename
  6. Suppose you want to find out the MD5 checksum of a file, use the command as follows: ‘get-filehash -Algorithm MD5 Frija-v1.4.2.zip‘.

    md5 checksum windows command
    MD5 checksum command line Windows 10

That’s it! You have successfully checked the MD5 checksum on your Windows 10 PC using a command line.

Windows certutil -hashfile Command

Besides the Windows command line mentioned above, you can also make use of the built-in Certificate Utility tool to verify MD5 and SHA checksum. In this method though, you need to use the Windows Command Prompt instead of PowerShell. ‘certutil -hashfile’ command-line tool supports the following hash algorithms.

  • MD2
  • MD4
  • MD5
  • SHA1
  • SHA256
  • SHA384
  • SHA512

Please, note that SHA1 is the default hash of the ‘certutil -hashfile’ command if you don’t provide a value. Just open a command prompt and execute the following command to check the MD5 hash checksum of a file:

CertUtil -hashfile <path to file> MD5
windows 10 certutil -hashfile command
certutil -hashfile command Windows 10

To find out the SHA checksum, you just need to replace the MD5 parameter in the above command with some other hash algorithm. Using the Command Prompt, you can also format a USB drive on Windows 10.

Mac OS X Hash Checker Commands

If you are a Mac user, you can use terminal commands to check the hash value or MD5 checksum of a file.

  1. Navigate to Applications > Utilities > Terminal.
  2. Launch the Terminal and execute the following commands to find out the MD5, SHA1, SHA256, and SHA512 hash algorithms. Make sure to replace ‘uTorrent.dmg‘ with your own file name and path to the file. Suppose the file is located in the Downloads folder, the path to file would go like this: /Users/Username/Downloads/file-name.extension.
    MD5: $ md5 uTorrent.dmg
    SHA1: $ shasum -a 1 uTorrent.dmg
    SHA256: $ shasum -a 256 uTorrent.dmg
    SHA512: $ shasum -a 512 uTorrent.dmg
md5 checksum command mac
MD5 sum command Mac Terminal

Following is an example of the output you will get with the hash of the file.

MD5(WebStorm-2020.1.1.dmg)= d41d8cd98f00b204e9800998ecf8427e

Thus, you can easily get the MD5 checksum on Mac. Do you know all the possible ways to capture the screen of your Mac? Here are 3 methods to take screenshots on macOS.

Linux Command Line to Check Hash

If you are using Linux users or have been using any of the Linux distributions on your computer, here is how you can check or verify the checksum of MD5 (md5sum), SHA1 (sha1sum), SHA256 (sha256sum), SHA224 (sha224sum), or SHA384 (sha384sum) using commands. Just launch the Terminal window and execute the following command to go to the directory where the file is located. In case you have Ubuntu, you can use this command:

[email protected]:~$ cd Downloads

Then, you will need to use the following command:

md5sum Frija-v1.4.2.zip

The MD5 checksum of the file would print out as follows:

8044d756b7f00b695ab8dce07dce43e5 Frija-v1.4.2.zip

Similarly, if you want to check the SHA256 hash of a file, you can use the following command:

sha256sum ubuntu-mate-20.04-desktop-amd64.iso

You can use the above commands with other algorithm types of hash.

GtkHash Tool (Ubuntu)

If you want to generate or verify the checksums of various algorithms via GUI (graphical user interface), you can use a tool called GtkHash. It supports all well-known hash algorithms including MD5, SHA1, SHA256, SHA512, Whirlpool, Tiger, RipeMD, HAVAL, etc.

GtkHash hash preferences Ubuntu

Download GtkHash from Github and install it using the following command:

sudo apt install gtkhash

When GtkHash is installed, launch the app and add the file by clicking the Browse icon in the File section. If you want to match the checksum of the original file with your downloaded copy, paste the original hash value in the Check field and click the Hash button. Below is an example of SHA1 hash check for the Ubuntu MATE ISO image.

GtkHash checker tool Ubuntu
GtkHash Ubuntu

In case you decide to uninstall this app later, head over to our tutorial on uninstalling apps on Ubuntu. Moreover, you should also check out these 20 useful commands for Ubuntu to make the most of your computer.

Hash Checker Tools

If you don’t find the Windows command line method convenient enough, you can try one of the following hash checker utilities on your Windows 10, Mac, or Linux machine.

QuickHash (Windows/Mac/Linux)

The very reason why QuickHash is my favorite is that it’s versatile. It’s an open-source hash checker and hash generator tool for Windows (32 and 64-bit), macOS, and Linux. QuickHash is not only very easy to use but also offers more features than most other hash checkers and generators. However, it supports only a few popular hash algorithms.

  • MD5
  • SHA1
  • SHA256
  • SHA512
  • xxHash64

QuickHash can check hash code or MD5 checksum for a single file, multiple files, or all files in an entire folder or disk. If you want to compare the hash codes or MD5 checksums of 2 files or folders, QuickHash can help you with that too.

quickhash hash md5 checker
QuickHash hash checker

Suppose you want to compare MD5 checksum of two files in QuickHash, you just need to click the Compare Two Files tab, add both the files and click the Compare Now button. Not just that, QuickHash can also generate the checksum or hash value for all supported types.

Download QuickHash hash checker for Windows, Mac, and Linux (Debian) from quickhash-gui.org.

Hash Generator (Windows)

Hash Generator is another free hash checker tool that can generate and compute the checksums or hashes of no less than 16 popular hash algorithm types that include:

  • MD5 family (md2, md4, md5)
  • SHA family (sha1, sha256, sha384, sha512)
  • LM
  • NTLM
  • ROT13
  • CRC32
  • BASE64
  • ADLER32
  • HAVAL256
  • RIPEMD160
  • WHIRLPOOL

Hash Generator even lets you export the complete list of hash values to a text, HTML, XML, or CSV file. Whether you want to verify the checksum of an MD5 or an SHA encrypted file or generate a new hash value for any text, Hash Generator is what you need.

hash generator tool windows
Hash Generator
  1. Download and install Hash Generator on your Windows PC.
  2. If you want to check the checksum of a file, just click the Browse button. You can also simply drag and drop your file as well. However, if you want to generate the hash for a text, you’ll have to select the Text option and paste your text.
  3. Then click the Generate Hash button and you will see a list of checksums or hash values for all 16 hash algorithm types.
  4. Hash Generator adds a quick shortcut in the right-click context menu to easily generate hash and checksum for any file easily.hash generator context menu shortcut

HashTab Hash Checker (Windows)

HashTab is a great option for Windows users because it takes a very practical take on how a hash checker tool should work. Once you have installed HashTab, you don’t need to launch it in a separate window. The program supports 30 types of hash algorithms. However, only MD5, CRC32, and SHA1 hashes are available by default. You can easily enable the additional hash types from the app settings. HashTab used to be available for Mac as a paid app but it has been taken down from the iTunes Store.

HashTab adds a tab called File Hashes in the Properties menu of a file. Here’s how to use HashTab.

  1. Right-click the file on which you want to perform the MD5sum or hash value check.
  2. In the context menu, click on Properties > File Hashes.
  3. The tool will automatically list the hash value or checksum of CRC32, MD5, and SHA-1.

    hashtab file hashes tab
    HashTab Windows hash check

  4. If you want to add more hash algorithms, click on Settings, and select the hash types you want to add.hashtab hash algorithms

By using the Compare a file… option you can compare the hash value of one file with another file.

Verify MD5sum on Android

If you want to check MD5 checksum on your smartphone or tablet, there are some good Android apps that you can try. Having tested 13 apps from the Google Play Store, I found 2 apps that really work great. Hash Droid supports not only MD5 hash check but also Adler-32, CRC-32, Haval-128, MD2, MD4, RIPEMD-128, RIPEMD-160, SHA-1, SHA-256, SHA-384, SHA-512, Tiger, and Whirlpool.

There is yet another app called Crypto – Tools for Encryption & Cryptography that combines a host of tools and utilities together. The app is like a Swiss Army knife. You can use the Checksums tool in the app to verify the hash of a file.

Online Hash Checker

Online Tools is the best hash checker website to check the hash checksum of a file online. It’s an ad-free and open-source platform that gives you hash file checksum for a huge range of hash algorithms of the following types:

  • CRC-16
  • CRC-32
  • MD2
  • MD4
  • MD5
  • SHA1
  • SHA224
  • SHA256
  • SHA384
  • SHA512
  • SHA512/224
  • SHA512/256
  • SHA3-224
  • SHA3-256
  • SHA3-384
  • SHA3-512
  • Keccak-224
  • Keccak-256
  • Keccak-384
  • Keccak-512
  • Shake-128

Just visit Online Tools, select the File Hash type, and drop your file.

online tools file hash checker

Hasher Hash Generator Extension

If you are looking for a great hash generator tool, you should give a try to Hasher Chrome extension. It’s a very easy-to-use utility (for developers) that computes cryptographic hashes.

Hasher chrome extension

Having added the Hasher extension to your Chrome Browser, you just need to launch it and enter the text for which you want to generate the hash, HMAC, CRC, etc.

Whatever hash checker method you use, tt’s always a good thing to verify the MD5 checksum or SHA value of a file to make sure it’s not tampered. Personally, I would recommend using the command-line method or tools like QuickHash or HashTab. They certainly are far better than an online hash checker.

Read Next: Download the Latest SDK Platform Tools (Windows, Mac & Linux)

 

Add comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts