Hash Compare

Compare a text hash against a given value to verify a downloaded file

—

The right way to verify a hash by comparison

Why a dedicated comparison tool is needed

Verifying file integrity goes like this: take a hash from the publisher, compute the hash of your local file, and compare the two. It sounds like "just eyeball whether they match", but there are several easy mistakes in practice:

The correct flow

  1. Compare length first. Different length means mismatch, and the length also hints at the algorithm (32 means MD5, 40 means SHA-1, 64 means SHA-256, 128 means SHA-512).
  2. Normalize case and trim leading/trailing whitespace.
  3. Compare character by character, and when a difference appears, locate it. A difference in just one segment suggests a truncated copy; an entirely different value usually means the file itself is wrong or the algorithm differs.
  4. Confirm the algorithm matches. If the publisher gave SHA-256, you cannot compute MD5 and compare against it.

What it defends, and what it does not

A hash comparison confirms that the file in your hands is the same one the publisher hashed, or at least that the contents match. It catches transmission corruption during download, a CDN serving a stale version, and grabbing the wrong file by mistake.

What it cannot defend against is someone who replaces both the file and the hash on the page. If an attacker can alter your download source, they can alter that hash too. To defend that layer you must place the hash somewhere they cannot reach — an HTTPS site (assuming the certificate is intact), an officially signed distribution channel, or a digital signature that makes the hash itself verifiable.

One more point: MD5 and SHA-1 hashes cannot prove "the file was not altered", because practical collision attacks exist for both. They are only fit for detecting accidental corruption.

How to use the tool

Paste the two hash values into the inputs. The tool compares after ignoring case and surrounding whitespace, and tells you clearly whether they match and whether the lengths are equal. It also accepts the hash filename checksum-file format (such as the output of sha256sum) and extracts the hash automatically. Everything is computed locally; nothing is uploaded.

FAQ

How is this different from the file hash tool?

Here you verify text content pasted in. To verify a downloaded installer, use the file tool and drop the file in directly.