Safely getting a MD5 checksum for a file

There are lots of 3rd party utilities out there for getting the a checksum of a file, but with sensitive data it's best to not read your files into any untrusted application.

Here is how to get MD5 checksums using only 1st party functionality from the OS vendor (Apple or Microsoft).


Mac

Download MD5.app, which is a thin wrapper around the built-in md5 command line utility (based on this AppleScript). If you run MD5.app, it will ask you to pick a file to checksum. If you drag a file onto MD5.app, it will checksum that file immediately.

You can verify the (very short) code for this application by opening AppleScript Editor.app, going to File > Open, and selecting MD5.app.

You can also run md5 /path/to/file.txt in Terminal.app.


Windows

Of course, this is not nearly as easy on Windows.

  1. Go to this Microsoft knowledge base page and click the download link for the File Checksum Integrity Verifier utility package midway down the page.
  2. Run the downloaded file, agree to the terms, and select your Desktop as the location to extract the files to.
  3. Two files will be extracted: ReadMe.txt (delete this) and fciv.exe. Create a folder for this at c:\Users\yourusername\fciv\ and move fciv.exe to this folder.
  4. Go to Start > Run, type "cmd", and press Enter to open the command prompt. You should already be in c:\Users\yourusername. Type "fciv\fciv.exe -add c:\path\to\file\to\checksum.txt"


Windows – Update (2019-08-26)

You can also use PowerShell to do this:

CertUtil -hashfile yourFileName MD5

(source)


🌟 Was this page helpful? Please let me know with this quick, 3 question survey.