Windows Archive Troubleshooting
Verify ZIP or RAR SHA-256 Checksums with PowerShell
A SHA-256 checksum helps confirm that an archive matches the copy published by its creator. Here is how to calculate the hash and interpret mismatches.
A downloaded ZIP or RAR may look correct while containing different bytes from the file the publisher intended. A SHA-256 hash is a fingerprint of the exact byte sequence. Comparing it with a checksum from a trusted source helps detect incomplete downloads and unexpected changes.
Compute a local hash
- Find the archive in File Explorer and copy its path. Confirm the download has completed; do not hash a browser's temporary partial file.
- Open PowerShell. Use
Get-FileHashwith the archive's actual path. SHA-256 is the default in current PowerShell versions, but specifying it makes your procedure explicit.
Get-FileHash -Path 'C:\Users\Public\Downloads\sample.zip' -Algorithm SHA256
- Copy the hexadecimal result. Compare every character with the value shown on the original publisher's download page or other independently trusted channel. Do not treat a few matching initial characters as a valid match.
- If the hashes differ, stop and obtain the file again from the trusted source. If the publisher supplied checksums for several versions or languages, make sure you are comparing the same build.
What a matching hash proves
An exact match indicates that your file's bytes match the reference file represented by that hash. It does not prove that the reference file is free from malware. An attacker who controls both a download and its displayed checksum could publish matching values for a malicious file.
Digital signatures provide a different assurance when correctly validated against the publisher's identity. For executables inside archives, check signatures where available, especially before running an installer.
Common mistakes
Do not hash the extracted folder and compare it with the compressed ZIP hash; they are different byte sequences. Renaming a file without altering its contents normally preserves its hash. Repacking files into a new ZIP changes the archive bytes even if the extracted contents look the same.
Frequently asked questions
Does changing a ZIP filename alter its SHA-256 value?
No. SHA-256 is calculated from file contents, not the filename. Recompressing or editing the bytes does change it.
Should a checksum be copied from a random mirror?
No. Use a reference from the publisher or another independently trusted source.
Is a matching SHA-256 enough to run an EXE safely?
No. Also assess the publisher, signature, source reputation and the purpose of the executable.
Related guides
Sources and further reading
The steps above describe Windows archive features and standard archive-management practices. Product capabilities can differ by installed version. No hands-on performance tests are claimed.
RareExplorer is an independent archive-format resource, not the publisher of WinRAR or 7-Zip. Review the original software publisher before installing downloaded programs.