how to generate MD5 file checksum

7 Ways to Generate a MD5 File Checksum (Windows and Android)

Do you wonder how to generate a MD5 file checksum? You are at the best place, in this article, I’ll show you 7 methods to do this, so you’ll necessarily find one that works for you.

As a general rule, the MD5 checksum for a file can be generated with a command line or third-party applications like Hash Generator or MD5 Checksum utility. The goal of a MD5 checksum is to detect any kind of corruption, especially after a file transfer.

The goal of this article is not to explain the MD5 algorithm, so if you need more details about, please take a look at this article first. It will explain everything you need to know before using MD5 file checksums.

Let’s get back to our main topic now, there are a number of ways to generate the MD5 File Checksum, and I’ll give you a bunch of them right now.

Master Linux Commands
Your essential Linux handbook
Want to level up your Linux skills? Here is the perfect solution to become efficient on Linux. 20% off today!

Download now

In the command prompt

Hide your IP address and location with a free VPN:
Try it for free now, with advanced security features.
2900+ servers in 65 countries. It's free. Forever.

A command line tool is built-in in the Microsoft Windows 10 operating system, as a certificate service, which is “CertUtil”. This command line offers a switch, “Hashfile”, thanks to this, a hash string can be generated. Here a specified algorithm can be used, such as MD5:

certutil -hashfile <file> <algorithm>
certutil -hashfile MD5

Generate a MD5 file checksum in the command prompt on Windows

With PowerShell

There is also a command in PowerShell.
This is the most efficient and the easiest method, as it does not include any kind of coding. If the PowerShell 4.0 is used then a command line, i.e., cmdlet exists in it. This cmdlet is also known as “Get-FileHash”. Thanks to this command line, a hash file can be easily generated :

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

Get-FileHash -Path <file> -algorithm <name>
Get-FileHash -Path -algorithm MD5

Use Get-FileHash in Powershell

Hash generator: right click to generate a MD5 checksum

You can also find tools that can be use in the right-click menu on a file. Hash Generator in one of them, we’ll get back to it very soon. But unlike the other, it add a nice option on your system.

After its installation, if a right click is done on this windows application then a context menu is opened. In this drop down menu, there is an option named as Hash Generator, which helps to generate the desired hashes in the file.
Download here

Hash Generator add a right-click option to generate an MD5 file checksum

3 Third Party Tools Methods

Not everybody is a coding person and thus not everybody uses the command lines therefore a few third-party tools are available that can serve the purpose in a better way.

These third-party apps have built-in command lines and the code hidden in them and thus when a command is entered to them to generate the MD5 Checksum for a file, they do so within a few instants and no extra hard work is required.
Such third-party apps are mentioned below, for instance:

Hash Generator

There is a free universal hash generating tool available in the market for Windows 10, namely the Hash Generator. Thanks to this software, the generation of fourteen different types of checksum or hashes is done easily. It supports a number of function families, including the MD5.
Download here

Hash Generator is the perfect tool to get the MD5 hash of a file

MD5 Checksum Utility

This is another tool, which is used to generate different types of checksum or hashes: MD5 & SHA Checksum Utility.
This MD5 Checksum Utility is different from the Hash Generator in a sense that it lets you match the actual file with the hash file to verify and ensure the integrity of the file.
Download here

MD5Checksum is another alternative to calculate the MD5 checksum


Compared to the MD5 Checksum Utility and the Hash Generator, the HashMyFiles tool is a smaller and a portable tool.

It serves the same purpose as that of the MD5 Checksum Utility and the Hash Generator, i.e., the generation of different types of checksum or hashes. It is different from the other two in a sense that it is fast and lets you check the hashes of a number of files at an instant.
Download here.

HashMyFiles is another way to check the MD5 hash

If the three options are compared then HashMyFiles is the best option available in the market as it is smaller, it is faster, it is portable and the most important fact of all these, it lets a person check a number of files an instant. Therefore, this HashMyFiles is most commonly used by a number of people looking for this feature.

The Tab from File’s Property Method

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

A “File hashes” Tab in the properties of the file is another free tool that helps you generate the checksum and hashes of a number of functions and files.

This Tab in the File Property comes after the installation of a free tool named as “HashTab”. Thanks to this tool, a separate tab is added in the dialogue box of the File Properties. If this tab is clicked in the dialogue box of file properties, it lets one display the hashes of the clicked file, of which the dialogue box of the file properties was opened for.
Download here.

With Hashtab, you can check the MD5 checksum in the file’s properties

On android

This part is intended for programmers, but can help you if you are in this case.

Hide your IP address and location with a free VPN:
Try it for free now, with advanced security features.
2900+ servers in 65 countries. It's free. Forever.

First method

First of all, to generate and check the checksum and hashes of the desired file, the file is converted to a string. After converting to a string, the following methodology or the code is used, as below:


public static String getMD5EncryptedString ( String encTarget )
   MessageDigest mdEnc = null;
   Try         {
      mdEnc = MessageDigest.getInstance ( "MD5" ) ;
   catch ( NoSuchAlgorithmException e )
      System.out.println( "Exception while encrypting to md5" );
      e.printStackTrace () ;

   mdEnc.update(encTarget.getBytes () , 0, encTarget.length () ) ;
   String md5 = new BigInteger ( 1, mdEnc.digest () ).toString ( 16 ) ;
   while ( md5.length () < 32 ) {
      md5 = "0" + md5;
   Return md5;

This method is good enough for the small sized files or strings and not for the bigger sized strings.

Second Method

With the help of the following code just, the checksum for MD5 in android Operating System can be achieved, as:

MessageDigest md = MessageDigest.getInstance( "MD5" ) ;
InputStream is = new FileInputStream ( "file.txt" ) ;
try {
   is = new DigestInputStream ( is, md ) ;

finally {
   is.close () ;

byte [] digest = md.digest () ;

More methods and notes on Android files hash here.

The above methods are used to generate MD5 checksum and hashes. The above seven mentioned methods are usable by different operating systems, which were mentioned along. For instance, the first five methods are for Windows 10 operating system and the next two, i.e., sixth and seventh methods are for android operating system.

Whenever you’re ready for more security, here are things you should think about:

- Break free from Gmail: You should be able to choose what happens to your data. With Proton, only you can read your emails. Get private email.

- Protect yourself online: Use a high-speed Swiss VPN that safeguards your privacy. Open-source, no activity logs. Get Proton VPN risk-free.

- Master Linux commands: A sure method to learn (and remember) Linux commands. Useful ones only, one at a time, with clear explanations. Download the e-book.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *