Skip to content

Instantly share code, notes, and snippets.

@joe-oli
Last active April 20, 2025 20:06
Show Gist options
  • Save joe-oli/1c14d6c82a19e8dcdd529acae0c661f0 to your computer and use it in GitHub Desktop.
Save joe-oli/1c14d6c82a19e8dcdd529acae0c661f0 to your computer and use it in GitHub Desktop.
certutil for filehashes

certutil -hashfile "Path\To\Some\File.mp4" SHA256

If you're curious about file hashes, they’re like digital fingerprints. If two files have the same hash, they’re bit-for-bit identical. Even one byte of difference would change the hash.

🔧 To check the hash on Windows (no install needed):

✅ For SHA-256 (recommended):

Open Command Prompt and run:

certutil -hashfile "I:\ZDOWNLOADS\3771391576.MP4" SHA256

Do it for both files:

certutil -hashfile "Path\To\Other\File.mp4" SHA256

Compare the output — if both hashes match, the files are 100% identical.


✅ For MD5 (shorter but less secure):

certutil -hashfile "I:\ZDOWNLOADS\3771391576.MP4" MD5

Still fine for comparing file contents (not for cryptographic security).


certutil is originally a tool for managing X.509 certificates and other public key infrastructure (PKI) stuff on Windows. But Microsoft also included some handy utility functions in it, like:

  • Hashing files (-hashfile)
  • Dumping certificate details
  • Managing certificate stores

So while it was made for certs, people often use it for file hashing just because it's already built into Windows.

If you’re ever curious about alternatives more focused on hashing, tools like Get-FileHash in PowerShell or cross-platform tools like sha256sum in Git Bash or WSL work great too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment