Compare Files

Check whether two files are identical, byte for byte

File 1

File 2

About Compare Files

Compare Files tells you whether two files are exactly the same, byte for byte, and if not, where the first difference is: its byte number, counted from 1 as the cmp command counts it, and its hexadecimal offset. If one file is the other with extra bytes at the end, it says so. Both files are read in pieces of 8 MiB with a progress percentage, so large files are never loaded whole. It does not show a line-by-line diff or list every difference. Typical uses: checking a download, a copy, or a backup against its original.

How to compare two files

  1. 1Click "File 1" and choose the first file.
  2. 2Click "File 2" and choose the second one.
  3. 3Click "Compare files" and follow the percentage on the button.
  4. 4Read the verdict, "Files are identical" or "Files are different", with the first differing byte and the name and size of each file.

Formats and limits

Files
Two, of any type
Comparison
Exact, byte by byte, stopping at the first difference
Reading
8 MiB of each file at a time, with a progress percentage
Size limit
None set in the tool; the files are never loaded whole
Result
Verdict, first differing byte (decimal position and hex offset), both names and sizes

Where your file is processed

Both files are read from your device by this page and compared there; neither file is uploaded and no copy of either is made. Large files are read in pieces, so they are never held whole in memory. If the comparison fails, our error log receives the cleaned message, the tool name, and your browser, never the files or their names.

Frequently asked questions

Does it show what changed between two text files?

No. It only answers whether the bytes are identical and where the first difference is. To see the lines that changed between two texts, use Diff Viewer in Developer Tools.

Can it compare very large files?

Yes, the tool sets no size limit: it reads both files 8 MiB at a time and stops at the first difference, so it never holds a whole file in memory. The time it takes grows with the size of the identical part.

Does it tell me where the files differ?

Yes, the first place only: "First difference at byte" gives its position counted from 1, followed by the offset in hexadecimal counted from 0. When one file simply continues past the other, it says they are identical up to that byte.

Do different names or dates matter?

No. Only the contents are compared; names and modification dates are ignored, so a renamed copy of a file shows as identical to the original.

Tips and tricks

  • ✓Two files of different sizes are always different; the tool still shows where they first diverge.