I have been happily using the tiny Bullzip MD5 Calculator to quickly get an MD5 hash directly from the context menu in Windows Explorer.
But what if you need a hash on a where Bullzip isn’t installed? Or a different hash?
Enter certutil, a command-line tool built into Windows. Certutil has many functions, mostly related to viewing and managing certificates, but the -hashfile subcommand can be used on any file to get a hash in MD5, SHA256, or several other formats.
Here is the Help text for –hashfile. Note the available algorithms:
Here’s an example of getting the MD5 hash of a file:
certutil -hashfile C:\bat\crashlog.txt MD5
Note that the hash algorithms are case-sensitive. Be sure to type, for example, “MD5”, not “md5”.
Update September 20, 2018
Note that on Windows 7, the hash algorithms are case-sensitive. Be sure to type, for example, “MD5”, not “md5”. On Windows 8.1 and 10, case doesn’t matter. (Thanks, Charlie!)
Another nice thing I discovered is that after typing
-hashfile, you can type the first one or two characters of the file name and press Tab to have it cycle through all file names that begin with those characters. Very handy e.g. when checking downloaded ISO files with file names like “en_windows_server_2012_r2_with_update_x64_dvd_6052708.iso”—all you have to type is “en” plus Tab.