A checksum is a short fingerprint calculated from every byte of a file. To verify a download, calculate the checksum of the copy on your computer and compare it with the value the publisher lists. If the two are the same, your file is identical to the one the publisher made the checksum from. If they differ, do not open the file. Download it again.
You can calculate the value in the browser with File checksum, or with a command that is already on your computer. Both ways are described below.
What a checksum is
A checksum of this kind is produced by a hash function such as SHA-256. Whatever the size of the file, the result has a fixed length, written as letters and digits: 64 characters for SHA-256. The same file always gives the same result, and the smallest change gives a completely different one.
You can see this with two short texts. The SHA-256 of the sentence "The meeting is at 10:00" is 247fe064b382ca2c446fbd3aa80fde21533d291c30c81ebf316da834dfe227fc. Change one digit, to "The meeting is at 11:00", and it becomes 47200447a3ca9c1bbe64670be7cbcaa228b0cbf5ddeb6c3fad079e0a5236f768. The Hash generator lets you repeat this with any text.
Why download pages publish one
- Damaged downloads. A large file can be cut short or corrupted on the way or on a faulty disk. An installer or a system image with one wrong byte may fail in confusing ways.
- Mirrors. Many projects let other servers distribute their files. The checksum on the project's own site lets you check that a copy from somewhere else is the real one.
- Tampering. If someone replaced the file with an altered version, its checksum no longer matches the published value.
Compare it step by step
- Find the published checksum on the publisher's official site and note which algorithm it uses. It is usually labelled SHA-256 or SHA256.
- Open File checksum and choose the downloaded file. It is read on your device and is not uploaded.
- Set Algorithm to the one the publisher used. SHA-256 is selected at the start.
- Compare the result with the published value from the first character to the last. The tool shows the value but does not compare it for you. Capital and small letters make no difference.
Comparing 64 characters by eye invites mistakes. Paste both values into Compare two texts, one in each box, in the same letter case, and any difference is marked. The guide to the checksum tool has more detail, including the limit for very large files, which have to fit in your device's memory.
If the values differ, first check that you picked the same algorithm. A SHA-1 value has 40 characters, SHA-256 has 64, SHA-384 has 96 and SHA-512 has 128. If the algorithm is right, download the file again, preferably from the official site, and compare once more.
The same check from the command line
Every common system can do this without extra software. Replace file.iso with the name of your file.
- Windows: certutil -hashfile file.iso SHA256
- Windows PowerShell: Get-FileHash file.iso
- macOS: shasum -a 256 file.iso
- Linux: sha256sum file.iso
What a match proves, and what it does not
A match proves that your copy is the same, byte for byte, as the file the checksum was made from. It rules out a broken download.
It does not prove that the file is safe, and it does not prove who made it. If an attacker controls the page you downloaded from, they can replace the file and the checksum next to it at the same time. A checksum is therefore worth most when it comes from a different, trustworthy place than the file: the project's official site over HTTPS when the file came from a mirror, for example.
Some publishers go one step further and sign their files or their checksum lists with a digital signature. Checking a signature shows that the file comes from the holder of a particular key, which a bare checksum cannot do. The installers of many programs for Windows and macOS are signed in a way the system checks by itself.
Which algorithm to use
Use whichever the publisher lists, and prefer SHA-256 or one of its longer relatives, SHA-384 and SHA-512, when there is a choice. The tool on this site offers those three and SHA-1.
SHA-1 and the older MD5 are considered broken for security purposes: researchers have produced different files with the same value. They still catch accidental damage, but they are a weak defence against deliberate tampering. MD5 is not offered here. If a site lists only an MD5 value, the command-line tools above can calculate it, for example certutil with MD5 in place of SHA256.
The check also works in the other direction. When you send someone an important file, for example an archive made as described in how to send many files as one ZIP, you can send its checksum by another channel so they can confirm it arrived unchanged.