Compare two files

See whether two files are identical and, if not, where they differ. Nothing is uploaded.

  • Runs in your browser
  • Free
  • No sign-up
Loading Compare two files…

How to use it

  1. Add the two files. The first is the original, the second is the changed one.
  2. Leave “Compare” on automatic, or choose byte by byte or line by line.
  3. Press the button. Read the answer, and download the diff if the files are text.

Questions

How are the files compared?

Every byte of one file is checked against the same place in the other, so a single changed bit is found. The files are read in pieces, so even very large files work. Two text files are also compared line by line, and the lines that changed are shown.

Are my files uploaded?

No. Both files are read on your device and nothing is sent anywhere.

What is “automatic”?

If both files are text (and not larger than 8 MB), they are compared line by line, with a list of what changed. Otherwise they are compared byte by byte, and you see how many bytes differ, where the first difference is, and the bytes around it side by side.

The text looks the same but the tool says they differ. Why?

Often it is the line endings: Windows files end lines with two characters (CRLF), Unix and macOS files with one (LF). The tool tells you when that is the only difference. You can also choose to ignore line endings, spaces at the ends of lines, or upper and lower case.

What is the downloaded diff?

A “unified diff”, the format of the diff program. When nothing is ignored, the patch program can apply it to the original to produce the changed file. When you ignore anything, the diff is only for reading.

Can it compare two pictures, PDFs or spreadsheets?

It compares their bytes, which tells you whether the files are exactly the same. Two pictures can look the same and still differ in their bytes. Use Image compare (diff) to see how pictures differ, and Compare two spreadsheets for tables.

Is a match proof that the files are the same?

Yes for “identical”: every byte was compared, not just a checksum, so there is no chance of a false match.

Are my files uploaded anywhere?

No. This tool runs in your browser, so your files stay on your device and are never sent to a server.

Is it free?

Yes, you can use it for free. A subscription removes limits and unlocks premium tools.