How to Verify 7-Zip Checksums
Verifying the checksum of a downloaded 7-Zip installer ensures that the file is authentic, uncorrupted, and free from malicious tampering. This guide walks you through locating the official hash provided by the developer, generating the SHA-256 checksum on your Windows machine using built-in command-line tools, and confirming that the values match before running the setup.
Step 1: Locate the Official Checksum
- Visit the official 7-Zip download page where you obtained the installer.
- Look for the link or section labeled SHA-256 or Checksums.
- Copy the official SHA-256 hash string corresponding to the exact
file you downloaded (e.g.,
7z2408-x64.exe).
Step 2: Calculate the File Hash on Windows
You do not need third-party tools to generate a checksum on Windows. You can use either Windows PowerShell or the Command Prompt.
Option A: Using Windows PowerShell (Recommended)
- Open the Start menu, search for PowerShell, and launch it.
- Run the
Get-FileHashcommand followed by the full path to your downloaded file:
Get-FileHash -Algorithm SHA256 "C:\Users\YourUsername\Downloads\7z2408-x64.exe"- Press Enter. PowerShell will output an Algorithm, Hash, and Path.
Option B: Using Command Prompt
- Open the Start menu, search for cmd, and open Command Prompt.
- Run the
certutilcommand:
certutil -hashfile "C:\Users\YourUsername\Downloads\7z2408-x64.exe" SHA256- Press Enter. The command prompt will display the SHA-256 hash on the following line.
Step 3: Compare the Hashes
To ensure the installer is safe:
- Visually compare the generated output against the hash listed on the 7-Zip website. Checksums are not case-sensitive.
- Alternatively, use PowerShell to verify the match automatically:
(Get-FileHash "C:\Users\YourUsername\Downloads\7z2408-x64.exe" -Algorithm SHA256).Hash -eq "PASTE_OFFICIAL_HASH_HERE"If the command returns True, the file is authentic and safe to install. If it returns False, or if the characters do not match, delete the file immediately and download it again from the official source.