Developer Tools

How to Verify a Download with a SHA-256 Checksum

Software sites often list a long “SHA-256” code next to a download. Comparing it with your file takes a minute and proves the file is exactly what the publisher released.

In this article
  1. What a hash is
  2. Why verify downloads?
  3. Step by step
  4. MD5, SHA-1 or SHA-256?
  5. Verifying on the command line
  6. Where to find official checksums
  7. Other uses for hashes
  8. Hashes are not for storing passwords

What a hash is

A hash function turns any data – a word or a 2 GB file – into a fixed-length fingerprint. Change a single bit of the input and the fingerprint changes completely. The same input always gives the same output. Good hash functions such as SHA-256 make it practically impossible to find two different files with the same fingerprint.

Hash Generator (MD5, SHA-256)Calculate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or any file, and compare against a published checksum to verify a download – all on your device.
Open the free tool

Why verify downloads?

  • Tampering: a mirror or compromised site could serve a modified installer containing malware.
  • Corruption: interrupted or faulty downloads can produce broken files that fail mysteriously.
  • Peace of mind for operating system images, firmware updates and crypto wallets, where a bad file can cause serious damage.

Step by step

  1. Download the file, and find the official checksum on the publisher’s website – ideally on their main site, not the mirror you downloaded from.
  2. Open the Hash Generator, switch to file mode and drop in the file (up to about 1.5 GB in the browser).
  3. Paste the official checksum into “Compare with”.
  4. Look for the green “Match” line next to SHA-256. If it says “No match”, delete the file and download again from the official source.

The tool calculates MD5, SHA-1, SHA-256, SHA-384 and SHA-512 together, so it works whichever algorithm the publisher lists. Upper or lower case does not matter.

MD5, SHA-1 or SHA-256?

AlgorithmLength (hex)Security today
MD532Broken – fine for accidental corruption checks only
SHA-140Broken for collisions – avoid for security
SHA-25664Secure – the standard choice
SHA-512128Secure

You can tell the algorithm from the length of the published code.

Verifying on the command line

Very large files are easier to check with built-in tools: on Windows PowerShell, Get-FileHash file.iso (SHA-256 by default); on macOS, shasum -a 256 file.iso; on Linux, sha256sum file.iso.

Where to find official checksums

Linux distributions publish SHA-256 files next to their ISO images, often in a file called SHA256SUMS. Many open-source projects list checksums on their GitHub release pages. Some publishers also sign their checksum files with GPG, which proves the checksums themselves were not altered – the most thorough level of verification.

Other uses for hashes

  • Checking two files are identical without comparing them byte by byte.
  • Detecting changes – store a document’s hash and check it later.
  • Developers use hashes for cache keys, ETags and test vectors.

Hashes are not for storing passwords

Plain SHA-256 is far too fast for password storage – attackers can try billions of guesses per second. Websites must use slow, salted password-hashing functions such as bcrypt, scrypt or Argon2. And a hash is not encryption: it cannot be reversed to get the original data back.

Hashing runs locally in your browser with the Web Crypto API, so files are never uploaded. Need random secrets instead? Try the Password Generator.

Hash Generator (MD5, SHA-256)Calculate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or any file, and compare against a published checksum to verify a download – all on your device.
Open the free tool
Keep reading

Related articles

All articles
Dev

What Is Base64 – and When Should You Use It?

Base64 shows up in emails, web pages, API keys and data URIs. It is simple once you see what problem it solves – and what it does not do.

3 min read
Dev

How Strong Should Your Password Be? Length, Symbols and Entropy Explained

Rules like “one capital, one number, one symbol” produce passwords that are hard to remember and easy to crack. Here is what actually makes a password strong.

3 min read
Dev

UUID v4 vs v7: Which Should You Use for IDs and Database Keys?

UUIDs let systems create IDs anywhere without asking a central server. The newer version 7 fixes a real performance problem with the classic random v4.

3 min read