Compare two text files online and see every difference.

Runs in your browser. Nothing is uploaded.
Original
Changed
Ctrl+Enter to compare
Clean up both texts before comparing

How to compare two text files

Diffline compares two files line by line and highlights every word that changed. It takes three steps:

  1. Open the original file. Click Open file above the Original box and choose it, or drag the file from your desktop onto the box. Its name appears above the box so you always know which file is which.
  2. Open the changed file. Do the same above the Changed box. The comparison starts at once.
  3. Read or save the result. Removed lines are red, added lines are green and changed words are highlighted. Click Download to save the result as a .diff file headed with both file names, or Copy result to paste it anywhere.

Tip: turn on Changes only to hide the parts of long files that did not change, and use Ignore spacing when one file was re-indented or saved by a different editor.

What files you can compare

Log files

Compare a log from a working run with one from a failing run to find the first line where they part ways.

CSV and data exports

Check two exports of the same report to see which rows were added, removed or changed. Sort lines first in the clean up helpers if row order does not matter.

Code and config files

Compare two versions of a .js, .py, .sql or .yaml file when you do not have Git at hand, or when a colleague sends you an edited copy.

Documents and subtitles

Markdown notes, .txt drafts and .srt subtitle files are plain text too, so you can see exactly what an editor or translator changed. For Word or PDF files, copy the text out and paste it into each box.

Each file can be up to 50 MB. Files saved on Windows and on a Mac or Linux machine compare cleanly, because their different line endings are treated as the same.

Your files never leave your device

When you open a file in Diffline, your browser reads it from your own disk and the comparison runs inside the page. The file is never uploaded, stored on a server or logged, so internal logs, customer exports and private documents stay with you.

Downloading the result is private too: the .diff file is built by your browser and saved straight to your device. You can read more in our Privacy Policy, compare plain text or compare JSON instead.

Frequently asked questions

How do I compare two text files online?

Click Open file above the Original box and choose the first file, then do the same above the Changed box, or drag each file onto its box. Diffline compares them line by line at once and shows each file name above its box.

Which file types can I compare?

Any plain text file: .txt, .csv, .log, .md, .json, .xml, .yaml, .html, .srt subtitles and most code files such as .js, .py, .java or .sql. Images, PDFs, Word documents and other binary files are refused with a message instead of showing garbage.

Is there a file size limit?

Each file can be up to 50 MB. Large files are compared in the background so the page stays responsive, and very long results are shown a few hundred lines at a time as you scroll.

Do Windows and Mac or Linux line endings show up as changes?

No. Windows files end lines with CRLF and Mac or Linux files with LF. Diffline treats both the same, so a file saved on Windows and the same file saved on a Mac compare as identical.

Can I save the result?

Yes. Click Download to save the comparison as a .diff file headed with both file names, or Copy result to paste it into an email or chat. The file is created by your browser, so nothing is uploaded.

Are my files uploaded anywhere?

No. Your browser reads the files from your device and compares them in the page. They are never sent to a server, stored or logged, and they are gone when you close the tab.