How-toFiles, checked and kept local

How to verify a download with a checksum

Check that a download matches the SHA-256 value its publisher printed, with commands already on your computer, and what a match proves.

  • How-to
  • 5 min read
Two checksums one above the other, the one published by the developer and the one calculated on your computer, identical to the last character, with a green tick.
IllustrationThe whole check: two long strings that must match exactly. Values shortened.

Quick answer

A checksum match proves your copy is byte-for-byte the file the checksum describes. It does not prove who made that file.

  • Use SHA-256 when the publisher offers it. MD5 and SHA-1 only catch accidental damage, not deliberate tampering.
  • Every major desktop already has the command: Get-FileHash on Windows, shasum on macOS, sha256sum on Linux.
  • Compare against a value from the publisher’s own site or signed release notes, never one sent with the file.

Step by step

  1. Find the published value

    On the publisher’s download page or release notes, find the checksum next to the exact file you downloaded. Note the algorithm, usually SHA-256: 64 hexadecimal characters.

  2. Open a terminal where the file is

    On Windows 11, open the Downloads folder in File Explorer, right-click an empty area and choose Open in Terminal. On macOS or Linux, open Terminal and type cd ~/Downloads.

  3. Calculate the checksum

    Run the command for your system, replacing the file name with yours. Windows (PowerShell) is shown; on macOS use shasum -a 256 file-name, on Linux sha256sum file-name.

    Get-FileHash .\file-name.iso -Algorithm SHA256
  4. Compare the two values

    Let the computer compare rather than reading 64 characters by eye. In PowerShell this prints True or False; the comparison ignores upper and lower case.

    (Get-FileHash .\file-name.iso).Hash -eq 'PASTE-THE-PUBLISHED-VALUE'
  5. Act on the result

    True means your copy is intact. False means do not open or install it: delete it, download again from the publisher’s own site, and check again.

A checksum is a short fingerprint calculated from every byte of a file. Change one byte and the fingerprint changes completely. When a publisher prints the fingerprint of the file they released, you can calculate the fingerprint of the copy you received and compare the two. If they match, the download arrived exactly as published.

This takes under a minute, and nothing needs to be installed.

What a checksum tells you, and what it does not

A match tells you two files are identical. That is the whole claim. It catches a download that was cut short, corrupted on a flaky connection or on a failing USB stick, or swapped for a different version.

It does not tell you the file is safe or who made it. If an attacker can change the file on a website, they may also be able to change the checksum printed beside it. For that you need a digital signature, which is covered below. Treat a checksum as an integrity check, and a signature as an identity check.

Check Answers Typical use
Checksum (SHA-256) Is my copy identical to the file described? Large downloads, disk images, copies between drives
Digital signature Was this file signed by the publisher it claims, and unchanged since? Installers and apps before you run them

Which algorithm to use

Publishers usually print one of these. Use the strongest one they offer.

Algorithm Length (hex characters) Use it for
SHA-256 64 The normal choice for verifying downloads
SHA-512 128 Equally suitable; some Linux distributions publish it
SHA-1 40 Accidental damage only; no longer considered secure against attack
MD5 32 Accidental damage only; no longer considered secure against attack

Microsoft’s own documentation for Get-FileHash says MD5 and SHA-1 should only be used for simple change validation, not for files that need protection from tampering.

Windows

A PowerShell window running Get-FileHash on installer.exe in the Downloads folder, showing the SHA256 algorithm and a long hash, with a note to compare it with the value on the developer’s page.
IllustrationWhat Get-FileHash prints. Hash shortened and the Path column left out.

PowerShell includes Get-FileHash, and its default algorithm is SHA-256:

Get-FileHash .\file-name.iso

To use a different algorithm, add -Algorithm SHA512 (or SHA1, SHA384, MD5). To compare in one line, which avoids misreading a long value:

(Get-FileHash .\file-name.iso).Hash -eq 'PASTE-THE-PUBLISHED-VALUE'

PowerShell’s -eq ignores upper and lower case, so a published value in lowercase still matches. If you prefer Command Prompt, certutil does the same job:

certutil -hashfile file-name.iso SHA256

macOS

macOS includes shasum. Choose the algorithm with -a:

shasum -a 256 file-name.dmg

If the publisher provides a checksum list file (often named SHA256SUMS), put it in the same folder and let shasum check it: shasum -a 256 -c SHA256SUMS. Each file listed is reported as OK or FAILED.

Linux

Most distributions include sha256sum from GNU coreutils:

sha256sum file-name.iso

To check against a published list, run sha256sum -c SHA256SUMS. If the list names files you did not download, add --ignore-missing so only the files you have are checked.

If the values do not match

  1. Check you compared the right line. Release pages often list many files. Make sure the value belongs to the exact file name, version and architecture you downloaded.
  2. Check the algorithm. A SHA-1 value compared with a SHA-256 result can never match. The length tells you which one you have (see the table above).
  3. Download again from the publisher’s own site, not a mirror or a link someone sent you, then repeat the check.
  4. If it still fails, do not run the file. Delete it and report the mismatch to the publisher.

Checking who made an installer

On Windows, right-click an .exe or .msi, choose Properties, and open the Digital Signatures tab if there is one. In PowerShell, Get-AuthenticodeSignature .\setup.exe shows whether the signature is Valid and names the signer. A valid signature from the publisher you expected, together with a matching checksum, is a much stronger result than either alone.

An installer’s Properties dialog on the Digital Signatures tab, listing the signer Example Software Ltd with sha256 and a timestamp, and the Digital Signature Details dialog saying This digital signature is OK.
IllustrationWho signed an installer, in its Properties. Publisher name is an example; wording simplified.

Linux distributions often sign their checksum list with GPG; their download pages explain how to verify that signature with their published key.

Ratherform’s release availability page explains the checksum and signing state a release listing shows. The current download page says whether a public installer exists yet.

Written by

Ratherform Editorial

Written and checked by the team that builds the app

The Ratherform guides are written by the people who build Ratherform and checked against the app itself and against each source we link. When a guide shows the app, the picture is a real screenshot of a development build, and when it describes another product, it links that product’s own page and says when it was checked.

Checked . Commands and options checked against Microsoft Learn (Get-FileHash, certutil, Get-AuthenticodeSignature), the GNU coreutils manual and the shasum documentation. Not a test of any particular publisher’s download.

Sources and further reading

  • learn.microsoft.comGet-FileHash defaults to SHA256, accepts SHA1, SHA256, SHA384, SHA512 and MD5, and MD5/SHA1 should only be used for simple change validation.
  • learn.microsoft.comcertutil -hashfile computes a file hash with a named algorithm.
  • gnu.orgsha256sum computes SHA-256 digests and supports a check mode for checksum lists.
  • perldoc.perl.orgshasum -a 256 computes SHA-256 digests and -c checks them against a list.
  • learn.microsoft.comGet-AuthenticodeSignature reports the Authenticode signature status of a file.

Published . Last updated . Next review by .