Join our Newsletter — 33% off our NHI Course
Home› Guides› Checksums for Beginners: How to Check a Download…
Guide Data Security

Checksums for Beginners: How to Check a Download Has Not Been Changed

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 30 November 2026 9 min read
On this page

A checksum is a short code worked out from a file's contents, used to spot whether the file has changed.

This guide is for anyone who has seen a long string of letters and numbers next to a download link and skipped past it. It shows you what that string is for and how to check it on Windows and Mac. You only need to be able to open a command window.

In short

  • A checksum is a value computed on data to detect error or manipulation [1].
  • Software publishers often list a checksum next to a download. You work out your own copy's checksum and compare.
  • If the two match, your file is the same as the one the publisher listed. If not, do not open it.
  • Use SHA-256. MD5 and SHA-1 are no longer considered secure against tampering [2].

What you will learn

  • Explain what a checksum is and what it proves.
  • Work out a file's SHA-256 checksum on Windows and Mac.
  • Compare it with the publisher's value the right way.
  • Know why a signed checksum list is stronger than a plain one.
Fingerprint (hash)
a fixed-length code worked out from a file's contents.
Recipe name (algorithm)
the method used to make the code, such as SHA-256.
Match check (verification)
comparing your code with the publisher's code.

What is a checksum?

Think of a seal on a jar of jam. If the seal is intact, nobody has opened the jar since it left the factory. If it is broken, you throw the jar away.

A checksum works like that seal for a file. A maths function reads every byte of the file and produces a short code. Change even one byte, and a good function gives a completely different code.

The US standards body NIST defines a checksum as a value computed on data to detect error or manipulation [1]. For downloads, people use a cryptographic hash function such as SHA-256 to make it.

Where the comparison stops working: anyone can see a broken jar seal. A checksum only helps if you work out your own copy's code and compare it with a value you trust.

Why does it matter?

Downloads can be damaged on the way, or swapped for a harmful copy on a mirror site. A checksum check catches both before you install anything.

If you install software at home

What could happen: a copy of a popular tool from an unofficial site has been changed to include malware.

Check this: download from the official site and compare the checksum it lists.

Next: Malware for Beginners

If you work in IT support

What could happen: you build fifty laptops from a disk image that was corrupted during copying.

Check this: verify the image's checksum once before you roll it out.

Next: File Hashes and Reputation Checks for Beginners

If you build or automate software

What could happen: a build script pulls a tool from the internet and runs it without checking it.

Check this: have scripts compare a pinned SHA-256 value before running anything they download.

Next: Software Supply Chain Security Guide

What does it look like?

Here is a made-up checksum line, the kind you see on a download page. The values are fake.

Example only. All values are made up.

File:      example-tool-0.0.zip                              (1)
Algorithm: SHA-256                                           (2)
Checksum:  0000aaaa1111bbbb...FAKE...9999ffff (64 characters) (3)
Signed:    SHA256SUMS.gpg (EXAMPLE signature file)           (4)
  1. The exact file name the checksum belongs to. A different version has a different code.
  2. The method used. You must use the same one when you check.
  3. In a real file, this line would contain the real 64-character SHA-256 code for that download.
  4. Some publishers also sign the checksum list, so you can tell it came from them [3].

Why this is risky: if the checksum and the file come from the same hacked page, an attacker can change both.

The safer way: get the checksum from the official site over HTTPS, and check the signature on the checksum list where the publisher offers one.

How does it work?

  1. Download the file and the publisher's checksum. Use the official site. Note which algorithm it uses, ideally SHA-256.
  2. On Windows, open PowerShell. Run Get-FileHash followed by the path to your file. It uses SHA-256 unless you ask for another algorithm [2].
  3. On a Mac, open Terminal. Ubuntu's guide suggests installing the free GNU coreutils with Homebrew, which adds the sha256sum command [3]. Then run sha256sum followed by the file name.
  4. Compare the two codes. Every character must match. Comparing only the first and last few characters is not enough.
  5. Act on the result. If they match, the file is the one the publisher listed. If they do not, delete it and download again from the official site.
  6. For extra safety, check the signature. Ubuntu verifies the signature on its SHA256SUMS file before checking the download, because the checksums only help if the list itself is genuine [3].
Diagram titled Checking a download with a checksum. Five boxes in a row: 1 Download the file from the official site; 2 Copy the publisher's SHA-256 checksum; 3 Work out your own, with Get-FileHash on Windows or sha256sum on Mac; 4 Compare every character; 5 Match means install, no match means delete. A note underneath says a different file gives a completely different code, and to check the signature on the checksum list when one is offered.
Figure 1. Five steps to check a download before you open it.

Some algorithms are too old for this job. Microsoft says MD5 and SHA-1 should only be used for simple change checks, not to protect files from attack or tampering [2].

A worked example

This story is made up to show the idea.

Darius Zamora volunteers as the IT helper for a local charity, Hillcrest Food Bank. He needs a free disk-imaging tool to set up three donated laptops.

A search shows two sites offering the tool. One is the project's own site. The other is a download portal with a big green button and lots of adverts.

Darius uses the project's own site. Next to the download he sees "SHA-256" and a long code. He copies the code into a note.

On his Windows laptop he opens PowerShell and runs Get-FileHash on the downloaded file. The code it shows matches the one on the site, character for character.

Out of interest, he also downloads the tool from the portal and checks that copy. Its code is completely different. He deletes it straight away without opening it.

His friend Juno Fairweather, who uses a Mac, asks how she would do the same. Darius sends her the steps for installing coreutils and running sha256sum.

Darius now checks every tool before he installs it on charity machines. It adds about a minute to each install, and he writes each checked code in the charity's IT notebook.

Myths and mistakes

What people thinkWhat is true
A checksum is a kind of encryption.It does not hide anything. It only lets you spot whether data has changed.[1]
Any algorithm will do.MD5 and SHA-1 are no longer considered secure against tampering. Use SHA-256.[2]
Checking the first few characters is enough.Compare the whole code. Copy and paste both into a search box or text editor if that helps.
A matching checksum means the software is safe.It means you got the file the publisher listed. It does not prove the publisher's file is free of bugs or malware.
A checksum on the same page as the file is always trustworthy.If the page is hacked, both can be swapped. A signed checksum list is stronger.[3]

What can I do this week?

  • Find one piece of software you plan to install and look for its SHA-256 checksum on the official site.
  • On Windows, run Get-FileHash on that download and compare every character.
  • On a Mac, set up sha256sum and try the same.
  • Delete any old download you cannot trace back to an official site.
  • Read File Hashes and Reputation Checks for Beginners to learn how hashes help spot known malware.

Checklist

  • I can explain a checksum as a code that changes when the file changes.
  • I download software from the official site.
  • I use SHA-256, not MD5 or SHA-1, for security checks.
  • I can run Get-FileHash on Windows or sha256sum on a Mac.
  • I compare the whole code, not just part of it.
  • I delete files whose codes do not match.
  • I check the signature on a checksum list when the publisher offers one.

Common questions

What is the difference between a checksum and a hash?

A hash is the output of a hash function. A checksum is any value worked out from data to catch errors or changes. For downloads, the checksum is usually a SHA-256 hash, so people often use the two words for the same thing.

Why does the publisher list several checksums?

Each file and each version has its own code, so a page with many downloads lists many codes. Some pages also give the same file's code in more than one algorithm. Pick the SHA-256 line for your exact file.

What if the codes do not match?

Do not open or install the file. Delete it and download it again from the official site. If it still does not match, contact the publisher, as the download or the listed code may have been changed.

Is a digital signature better than a checksum?

A signature proves who made something, not just that it is unchanged. Ubuntu, for example, signs its checksum list so you can confirm the list came from Ubuntu before trusting its codes[3].

Should automated scripts check checksums too?

Yes. Build pipelines and scripts that download tools run as software identities with no person watching. Having them compare a known SHA-256 value before running a download stops a changed file slipping through unnoticed.

Where next?

Ready for the detail? Read the practitioner guide: Hashing Guide. It explains how hash functions work, SHA-2 and SHA-3, keyed hashing and where each fits.

Also useful:

Related NHI Mgmt Group resources: Malware for Beginners, Drive-by Downloads and Malvertising for Beginners and Hash collision attacks.

Key terms

Checksum
A value computed from data to detect errors or changes.
Hash function
A function that turns any input into a fixed-length output, where small changes to the input give a very different output.
SHA-256
A widely used hash function that produces a 256-bit value, shown as 64 hexadecimal characters.
Integrity check
A test that confirms data has not been changed.
Digital signature
A cryptographic mark that proves who created data and that it has not changed.
Hash collision
When two different inputs give the same hash value.

Sources and further reading

  1. NIST CSRC Glossary, "checksum". https://csrc.nist.gov/glossary/term/checksum (accessed 30 Nov 2026).
  2. Microsoft Learn, "Get-FileHash", PowerShell documentation. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash (accessed 30 Nov 2026).
  3. Canonical, "How to verify your Ubuntu download", Ubuntu tutorials. https://ubuntu.com/tutorials/how-to-verify-ubuntu (accessed 30 Nov 2026).

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.