🧰 ToolPicoAll Tools →

HomeBlog › How Do I Check If a Downloaded File Was Corrupted?

How Do I Check If a Downloaded File Was Corrupted? A Hash Verification Guide

You just downloaded a large installer or disk image and the publisher's site lists a "SHA-256" value next to it. Here's what that number means, how to actually use it to confirm your download is safe, and when a plain hash isn't enough on its own.

In this guide

What a hash actually proves

Quick answerA hash is a fixed-length fingerprint of data — text or a file. The same input always produces the same hash, and changing even a single byte changes the hash completely. That makes it useful for confirming a file wasn't altered or corrupted, but a plain hash by itself doesn't prove who sent the file.

Hash functions like MD5, SHA-256, and SHA-512 take an input of any size and reduce it to a short, fixed-length string of hex characters (32 characters for MD5, 64 for SHA-256, 128 for SHA-512). Publishers list this value alongside a download so that anyone can independently recompute it and confirm the file arrived exactly as intended — no dropped packets, no tampering, no silent corruption from a flaky connection.

It's important to be clear about the limits here: a hash confirms integrity (the bits are unchanged), not authenticity (that a trusted party actually produced the file) unless the hash itself is delivered over a channel you trust, such as a signed release page. That distinction is exactly why HMAC exists, which we cover further down.

Verifying a downloaded file's integrity

Quick answerUpload the file to a browser-based hash tool, paste the hash value the publisher listed into the "expected hash" field, and let the tool compare them automatically. A match means the file is intact; a mismatch means re-download it.

In practice this is a three-step routine: find the hash the publisher lists (usually next to the download link, sometimes in a separate .sha256 file), open a hash tool and drop the downloaded file into it, then paste the published value into the comparison field. A tool that runs entirely client-side — using JavaScript for MD5 and the browser's built-in Web Crypto API for the SHA family — never uploads your file anywhere, so this works even for confidential documents.

Say, hypothetically, you download a 2.1 GB disk image and the vendor's page lists a SHA-256 value. In a slow or interrupted download, even one missing byte will produce a completely different digest — this is a made-up illustrative example, not a guaranteed real-world figure, but it shows why "close enough" doesn't apply to hashes: they either match exactly or they don't.

Example — verifying a hypothetical downloaded file (illustrative numbers, not measured data)
StepWhat you doResult
1Copy the SHA-256 from the publisher's pagee3b0c4...(64 hex chars)
2Upload the downloaded file to the toolTool computes actual SHA-256
3Paste expected hash, compareMatch → file intact

MD5 vs SHA-256 vs SHA-512 — which one to trust

Quick answerMD5 is fast but cryptographically broken — fine for casual checksums, unsafe for anything security-sensitive. SHA-256 is a solid general-purpose default; SHA-512 adds extra margin for systems that want it. SHA-1 sits between them and is now also considered weak.

The core tradeoff is speed versus security guarantees. MD5 (128-bit digest) and SHA-1 (160-bit digest) are both old enough that deliberate collisions — two different inputs producing the same hash — have been demonstrated, which rules them out for passwords, digital signatures, or anything an attacker might want to forge. They're still perfectly reasonable for catching accidental corruption, like a truncated download.

  • MD5 — 32 hex chars, very fast, use only for non-security checksums.
  • SHA-1 — 40 hex chars, legacy compatibility only, weak.
  • SHA-256 — 64 hex chars, today's general-purpose default, used in TLS certs.
  • SHA-384 / SHA-512 — 96 / 128 hex chars, larger security margin, common in high-assurance systems.
Key fact: a hash can never be reversed back into the original data — it's mathematically one-way. Short, predictable inputs like common passwords can still be matched against precomputed "rainbow tables," which is why passwords should always be hashed with an added random salt, not a plain hash alone.

Beyond plain hashing: HMAC and SRI

HMAC combines a hash function with a secret key, proving both integrity and that the sender knew the shared secret — this is what webhook signatures and API request signing rely on, instead of a plain SHA-256.

If you're verifying a webhook payload from a payment processor or automation platform, a plain hash isn't enough, because anyone can compute a SHA-256 of a message. HMAC-SHA256 requires a shared secret key, so only someone who holds that key could have produced the matching signature — that's the difference between "the data wasn't corrupted" and "this really came from the party who holds the secret."

SRI (Subresource Integrity) is a browser feature that lets an integrity="sha384-..." attribute on a <script> or <link> tag tell the browser to hash a CDN-hosted file before running it, and refuse to execute it if the hash doesn't match — protecting a site if the CDN is ever compromised.

Generating an SRI hash follows the same underlying math as any other hash, just with the output formatted as Base64 and wrapped in the algorithm-prefixed tag format browsers expect (sha256-, sha384-, or sha512-). If you paste in the exact content of a script or stylesheet file, a hash tool with an SRI mode can build the ready-to-use tag for you directly.

Compute all five hashes in one click

MD5, SHA-1, SHA-256, SHA-384, and SHA-512 for text or files, plus HMAC signing, CRC32, and SRI hash generation — entirely in your browser.

Try the free Hash Generator →

Frequently asked questions

How do I check if a downloaded file is corrupted?
Upload the file to a hash tool's File tab and paste the hash value the publisher listed (usually SHA-256) into the expected-hash box. The tool computes the file's actual hash and compares it automatically — a match means the file is intact and unmodified, a mismatch means you should re-download it.
Is MD5 still safe to use?
MD5 is fine for quick, non-security checksums like catching a corrupted download, but it is cryptographically broken for anything security-sensitive — collisions can be deliberately produced, so it should never be used for passwords or digital signatures. Use SHA-256 or SHA-512 for anything where security matters.
What's the difference between a hash and HMAC?
A plain hash (like SHA-256) only proves data hasn't changed; anyone can recompute it. HMAC combines a hash with a secret key, so it also proves the message came from someone who knows that key — which is why webhook signatures and API request signing use HMAC-SHA256 instead of a plain hash.
What is an SRI hash used for?
Subresource Integrity (SRI) lets you add an integrity attribute to a script or link tag loading a file from a CDN. The browser hashes the file before running it and refuses to execute it if the hash doesn't match, protecting your site if the CDN is ever compromised or the file is altered in transit.
Can I hash a file without uploading it anywhere?
Yes — a browser-based hash tool that uses the Web Crypto API computes the hash entirely on your device using JavaScript; the file itself is never uploaded to a server. This makes it safe to check the hash of confidential documents.
A note on the examples above: the download-size and file-verification numbers in this guide are illustrative examples used to explain the process, not measured statistics. Always use the hash value your specific file's publisher provides, and this article is general technical information, not security or compliance advice for your specific system.