Checksum calculator
Get the SHA-256, SHA-512, SHA-1 and MD5 checksum of any file, and compare it with the one the publisher gave you. It's calculated in your browser, so the file is never uploaded.
Drop a file here
An installer, a disk image, a zip: any file.
Checksums
Of your file.
- SHA-256
- SHA-512
- SHA-512, base64
- SHA-1
- MD5
Your file never leaves your computer: the checksums are calculated in this page and nothing is uploaded.
How to check a file's checksum
- Drop the file on the box above, or click "Choose a file".
- Paste the checksum the publisher gave you into "Compare with a published checksum".
- Read the result: it says "Match" and which algorithm matched, or "No match".
You don't have to pick an algorithm. The calculator works out all of them and compares your pasted value against each one. It ignores upper and lower case, spaces, and a prefix like sha256:.
To hash a piece of text, type or paste it in the text box. The text is hashed as UTF-8, exactly as typed, with no line break added at the end.
What a checksum is
A checksum is a short fingerprint of a file. A hash function reads every byte and produces a fixed-length value. Change one byte of the file and the value changes completely.
That makes it a quick way to answer one question: is this file identical to that one? If the checksum of your download equals the one on the publisher's site, you have the same bytes they published. If it doesn't, the download was cut short, corrupted on the way, or replaced.
The words checksum, hash and digest are used for the same thing here.
Which algorithm to use
| Algorithm | Length in hex | Use it for |
|---|---|---|
| SHA-256 | 64 characters | The default. Use this unless you're told otherwise |
| SHA-512 | 128 characters | The same job with a longer value. Some update systems require it |
| SHA-1 | 40 characters | Only to match an existing SHA-1 checksum |
| MD5 | 32 characters | Only to match an existing MD5 checksum |
SHA-1 and MD5 are broken for security purposes. Researchers have produced different files with the same MD5, and in February 2017 CWI Amsterdam and Google did the same for SHA-1. NIST has said SHA-1 should be phased out by the end of 2030. Both still catch accidental corruption, so they're fine for checking that a download wasn't truncated. They can't prove that a file wasn't swapped on purpose.
If you're publishing checksums for your own software, publish SHA-256.
Hex and base64
The same checksum can be written two ways. Hex is the long string of 0-9 and a-f you see on most download pages. Base64 is shorter and mixes upper and lower case letters, digits, + and /.
The calculator shows SHA-512 in both, because update feeds tend to use base64. electron-builder's latest.yml stores its sha512 that way, and so does the release feed LicenseSeat serves. If an update fails with a checksum mismatch, drop the installer here and compare the base64 value with the one in the feed.
Checksums from the command line
Every operating system has a built-in tool, which is what you want in a build script.
Windows (PowerShell)
Get-FileHash .\MyApp-Setup.exe -Algorithm SHA256
Windows (Command Prompt)
certutil -hashfile MyApp-Setup.exe SHA256
macOS
shasum -a 256 MyApp.dmg
Linux
sha256sum MyApp.AppImage
On Linux, sha256sum -c SHA256SUMS checks every file listed in a checksum file in one go.
For files of several gigabytes, use these. A browser has to hold the whole file in memory to hash it.
What a checksum proves, and what it doesn't
A checksum proves the file matches the checksum. It says nothing about who made either of them.
If someone can replace the download on a website, they can usually replace the checksum printed next to it too. So a checksum protects against corruption and against a mirror or CDN serving the wrong file. It doesn't protect against a compromised publisher.
A code signature covers that gap. It's a checksum of the file, signed with a private key that only the publisher holds, so the operating system can check both that the file is intact and who it came from. On Windows that's Authenticode, applied with SignTool. On macOS it's a Developer ID signature plus notarization.
Use both: sign the build, and publish a SHA-256 for people and scripts that want to check the download.
Publishing checksums for your own app
- Hash the final file. Sign first, then hash. Signing changes the file, so a checksum made before signing will never match what customers download
- Publish over HTTPS, next to the download. A
SHA256SUMStext file in the release folder is the convention - Generate it in your build. A checksum typed by hand is a checksum that will be wrong one day
- Know where else it's needed. Package managers ask for one: a winget manifest has an
InstallerSha256field, and a Homebrew cask hassha256 - Let the updater verify it. An auto-update feed should carry a checksum for each file, and the app should refuse a download that doesn't match
That last one is the most common place things go wrong. The pages on electron-updater and updating a Python app both cover the mismatch errors you get when the installer is rebuilt or re-signed after the feed was written.
LicenseSeat does this part for you: upload a release and the feed it serves includes the SHA-512 of every file, for the customers whose license entitles them to that version.
Common questions about checksums
What is a checksum used for?
To confirm that a file is exactly the one that was published. You calculate the checksum of your copy and compare it with the publisher's. If they're equal, the files are identical.
Is this checksum calculator safe to use with private files?
The file isn't uploaded. The hashing is done by JavaScript in this page, on your computer, so nothing about the file leaves it.
What's the difference between a checksum and a hash?
In this context, nothing. "Hash" is the output of a hash function such as SHA-256, and "checksum" is that value used to check a file.
Should I use MD5 or SHA-256?
SHA-256. Use MD5 only when the publisher gives you nothing else, and only to check for a damaged download.
Why doesn't my checksum match?
The usual causes are an incomplete download, a checksum for a different version or platform, or comparing against the wrong algorithm. Download the file again from the official site. If it still doesn't match, don't run it, and tell the publisher.
Can two different files have the same checksum?
In theory, since there are more possible files than checksums. With SHA-256 nobody has found two, and doing so on purpose isn't feasible with today's computers. With MD5 and SHA-1 it has been done, which is why they aren't trusted for security.
How do I find the SHA-256 of a file on Windows?
Drop it on this page, or run Get-FileHash yourfile.exe in PowerShell. SHA-256 is the algorithm it uses unless you choose another.
How large a file can I check here?
It depends on your computer's memory, because the browser reads the whole file before hashing it. A few hundred megabytes is fine. For multi-gigabyte files, use the command-line tools above.
Does a matching checksum mean a file is safe?
It means the file is the one the checksum was made from. Whether that file is trustworthy depends on where the checksum came from. A code signature from a publisher you recognise tells you more.