Are these two files the same file?
Compare any two files byte for byte without uploading either. Sizes are checked first, then a SHA-256 digest of each — so two files that differ anywhere at all come back as different.
Processed locally in your browserNothing you enter here is uploaded, logged or sent to any server.
How the comparison works, and why size is checked first
Two files of different sizes cannot be identical, and finding that out costs nothing — no reading, no hashing, no waiting. When the sizes differ the answer comes back immediately and the files are never read at all.
When the sizes match, each file is read and a SHA-256 digest calculated. Identical digests mean identical contents: producing two different files with the same SHA-256 is not something anyone has managed, and it is the assumption underneath most of modern software distribution.
Filenames, timestamps and permissions are not compared, because none of them is part of the file's contents. Two copies of the same file with different names come back identical, which is usually the question people are actually asking.
What "identical" does not mean
It does not mean either file is safe, clean, or free of anything unwanted. If one of them is malicious, an identical result tells you the other one is equally malicious.
It also does not mean the files are interchangeable in every sense. A document and a copy of it are byte-identical while sitting in different places with different permissions, and for some purposes that difference is the whole point.
What this tool does not claim
No tool on this site is described as unbreakable, military grade, or completely secure, because none of those phrases means anything a person could check. What is written down instead is which standard is used, which library implements it, and what the tool has been tested against.
Everything here runs in your browser using its built-in Web Crypto implementation. Nothing is uploaded, and there is no server that could receive it. That is a real and checkable property — open your browser's network tab and use the tool.
What this is useful for
Checking that a copy completed — after moving something to an external drive, restoring from a backup, or transferring over a network that gave up halfway. A file that looks the right size in a listing can still be truncated or partly written.
Confirming that two downloads of the same thing agree, when the publisher has not listed a checksum. Fetching from two different mirrors and comparing does not prove either is authentic, but it does make a single compromised mirror visible.
Working out whether a file has been modified since you last saw it, when you kept a copy. That is what a hash is for, and comparing directly saves recording the digest in the first place.
What it will not tell you
Where the files differ. Two files that differ by a single byte and two files that share nothing at all produce the same answer here: different. For text, a diff tool is the right instrument; for binaries, a hex comparison utility.
Both files have to fit in your browser's memory, which in practice means somewhere under two gigabytes each. Web Crypto cannot be fed a file piece by piece, so the whole thing has to be resident while it is hashed.
Related
The hash calculator for a single digest to record or publish, or the checksum verifier when somebody has given you a digest to check against.
Questions people actually ask
How does it decide?
Sizes first — two files of different sizes cannot be identical, and finding that out costs no reading at all, so when they differ neither file is opened. When the sizes match, each is read and a SHA-256 digest calculated; identical digests mean identical contents.
Does it compare filenames or dates?
No. Neither is part of a file's contents, so two copies of the same thing under different names come back identical — which is usually the question being asked. If you need to compare metadata, that is a different job from this one.
Will it show me where they differ?
No. Two files differing by one byte and two files sharing nothing produce the same answer here. For text, a diff tool is the right instrument; for binaries, a hex comparison utility.
Does identical mean safe?
No. It means the two files are the same. If one of them is malicious, the result tells you the other one is equally malicious.
Is either file uploaded?
No. Both are read into your browser's memory and hashed there by its own Web Crypto implementation. Nothing leaves the page and there is no server that could receive it.
What is the size limit?
Whatever your browser will hold, in practice somewhere under two gigabytes each. Web Crypto cannot be fed a file piece by piece, so each one has to be resident in memory while it is hashed.