Compare File Hashes

Check whether two files are identical, or whether a file matches the checksum you were given.

Two ways to compare

File against file

Select two files below and calculate. The result says straight away whether they are identical or different.

File against a checksum

Select the file, calculate, then paste the expected hash into the verify box under the result. It turns green on a match and red on a mismatch.

HASH_COMPARE
English

[1] SELECT FILE(S) TO HASH

One file, several, or two to compare.

[2] CHOOSE YOUR HASH FUNCTION

[3] LAUNCH THE HASHING PROCESS

Why comparing hashes works

A hash is a fixed-length fingerprint calculated from every byte of a file. Change a single bit and the fingerprint changes completely. So instead of comparing two large files byte by byte, you compare two short strings: if the hashes are equal, the contents are equal.

Only the content counts. The file name, the folder, the modification date and the permissions are not part of the hash. A video renamed from IMG_0042.mp4 to evidence.mp4 keeps the same hash; the same video re-encoded, trimmed or sent through a messaging app that compresses it does not.

Hashes are written in hexadecimal, so upper and lower case are the same value. A1B2 and a1b2 match. The verify box ignores case and surrounding spaces, and accepts a full line of sha256sum output.

Reading the result

You see It means
MATCH / IDENTICAL The files have exactly the same content.
NO MATCH / DIFFERENT At least one byte differs: a different version, an incomplete download, corruption or a modification.
Wrong length warning The pasted hash was made with another algorithm. An MD5 hash has 32 characters, SHA-1 has 40, SHA-256 has 64 and SHA-512 has 128. Select the matching algorithm and calculate again.

Same name, size and date is not enough

File managers make it tempting to compare what they show: the name, the size and the modification date. None of these describe the content. A one-character correction in a contract leaves the size unchanged, a copy tool can reset or preserve the date either way, and a corrupted sector in the middle of a video does not change its length. Two files can agree on all three and still differ.

The reverse also happens: identical content with different dates, because one copy came from a backup and the other from an e-mail attachment. Only a comparison of the content, which is what the hash summarises, settles it.

Many files, or a whole folder

The identical / different banner appears when exactly two files are hashed together. With more files, or with a folder selected through the folder button, each file gets its own row. To find the copies of one particular file in that list, paste its hash into the verify box: every row with that value is highlighted.

To compare two folders, for example a pen drive and the copy you made of it, hash each folder and export the results as CSV. Sorted by path, the two lists can be compared side by side in a spreadsheet; any row where the digests differ, or that exists on one side only, is a file to look at.

When two copies differ

  • ›Check the sizes first. If one copy is smaller, it is probably incomplete: an interrupted download or a copy that stopped early. Copy or download it again.
  • ›Ask where each copy came from. Files that passed through a messaging app, a cloud gallery or an e-mail gateway may have been re-compressed or had their metadata rewritten.
  • ›Hash both again. A second run that gives a different value for the same file points to a failing disk or cable rather than to the file.
  • ›Keep the original aside. If the files matter, work from copies and keep the one you trust untouched until you know which is right.

A hash from an e-mail, PDF or screenshot

Copy and paste whenever you can. The verify box ignores case and surrounding spaces, and when you paste a whole line such as 3a7b… report.pdf it keeps only the first word, the digest. A long value copied from a PDF is sometimes split across two lines; join it into one line before pasting, or only the first part is compared.

If you have to type a value from a printout or a screenshot, remember that hexadecimal uses only the digits 0–9 and the letters a–f. A letter O, I or l in a transcribed hash is a misreading of 0 or 1. When the length is wrong, the tool says how many characters it got and which algorithm that length belongs to.

Which algorithm to compare with

When you check a file against a published checksum, use the algorithm the publisher used. The length of their hash tells you which one it is, and the tool points it out if you pick the wrong one.

When you compare two files yourself, use SHA-256. MD5 is fine for spotting accidental differences such as a corrupted copy, but it is possible to deliberately build two different files with the same MD5. If someone could have an interest in faking a match, MD5 is not enough. The algorithm guide explains why.

The same check from the command line

Every operating system can calculate a hash without installing anything. Run the command on each file and compare the outputs.

Windows (Command Prompt)

certutil -hashfile file1.iso SHA256
certutil -hashfile file2.iso SHA256

Windows (PowerShell)

(Get-FileHash file1.iso -Algorithm SHA256).Hash -eq (Get-FileHash file2.iso -Algorithm SHA256).Hash

This prints True when the files are identical.

macOS

shasum -a 256 file1.iso file2.iso

Linux

sha256sum file1.iso file2.iso
sha256sum -c file1.iso.sha256   # check against a published checksum file

Nothing is uploaded

Both files are read and hashed inside your browser. Neither the files, nor their hashes, nor the checksum you paste are sent anywhere, so you can compare confidential documents or large videos without waiting for an upload.

FAQ

If two files have the same hash, are they identical?

With SHA-256, yes: no two different files with the same SHA-256 hash have ever been found. With MD5 and SHA-1 they are identical unless someone crafted a collision on purpose, which is feasible for those two algorithms.

Why do two copies of the same photo or video have different hashes?

Because their bytes differ, even if they look the same. Messaging apps, cloud galleries and editors often re-compress media or rewrite its metadata (date, location, camera). Compare the original files, not copies that went through such a service.

Does the file name change the hash?

No. The name, location and dates of a file are stored by the file system, not in its content, so renaming or moving a file keeps its hash.

Can I compare more than two files?

Yes. Select them all, calculate, and paste a hash in the verify box: every file with that hash is highlighted. You can also export the full list as a hash report.