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

Select one or multiple files to hash from your system, or drag and drop files below. Pick two files to check whether they are identical.

[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.

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 MD5 vs SHA-256 comparison 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.