Compare two text files online
Open two plain-text files from your computer, or paste their contents, to see which lines were added, removed or edited between them.
Free, no sign-up. Runs in your browser. Nothing you type or upload is sent to us or stored.
At a glance
- File types
- Plain text: .txt, .csv, .tsv, .json, .xml, .md, .html, .yml, .ini, .log, .srt, .tex and similar
- File size
- Up to 2 MB per file, read in your browser
- Spacing
- Extra spaces are ignored on this page, so re-indented lines don't show as changed
Share the final version as a link
Paste the version you settled on into Liite's quick paste and get a short link to send to anyone. No account needed.
Compare two text files online: what to know
This page starts the text diff for this case. For every option and how to use it, see the text diff.
Opening the files
Use Open a file under each box to load a file from your computer, or drag the text in by copying and pasting. The file is read by your browser and never uploaded, which matters for configuration files with passwords or customer lists.
The example on the page is two versions of a small settings file. One line has extra spaces, which the ignore-spaces option skips, two values changed and one line was added at the end.
Files this works for
Anything saved as plain text: notes, CSV exports, subtitles, logs, code and configuration. Word, PDF and Excel files aren't plain text, so open them in their own app and copy the text across instead.
Files saved on Windows end lines differently from files saved on a Mac or Linux. The comparison treats both the same, so a file moved between systems doesn't show every line as changed.
Questions
How do I compare two text files online?
Click Open a file under each box and choose your two files. The changed lines appear below, with the words that changed highlighted.
Are my files uploaded?
No. Your browser reads the files on your device and the comparison runs there too.
Can I compare a Word or PDF file?
Not directly. Copy the text out of the document and paste it into a box.