Diff checker for text and code
This diff checker compares two texts as you type, line by line and word by word inside a changed line. It runs in your browser, so both texts stay on your device and are not saved.
How to compare two texts
- Paste the original on the left and the changed text on the right, or open a file on each side.
- Read the changes below: a mark on the left of a line, and the changed words picked out inside it.
- Choose side by side or one column, and ignore case or spaces if they don't matter.
- Save the result as a .diff file if you need it.
Questions
Are my texts uploaded or saved?
No. The comparison runs in your browser, and the texts are kept only until you close the page. There is no save or share link, and nothing goes in your browser's storage. You can check this yourself. Browser extensions can still read any page, so turn off ones you don't trust.
Can git apply the saved diff?
It is a standard unified diff with three lines of context. Our tests apply each saved diff with a separate Python script and check that it turns the left text into the right one. They do not run git itself. With Ignore case or Ignore spaces on, the file leaves out what you chose to ignore, so it may not rebuild the right text exactly.
How large a text can it compare?
Up to 50 MB a file on a computer. In our test, two 50 MB files of 845,625 lines, with one line in every thousand changed, took 2 seconds in Chromium on a desktop computer, and the page's longest pause was 0.2 seconds. Heavily changed text is slower, and where a long part has too much change to compare line by line, the page shows it as removed and added whole and says so. Only the first 5,000 rows are drawn, and the saved diff has everything. Open long text as a file, because pasting it can freeze the box. The 20 MB limit on a phone is an estimate, not a measurement.
What happens with Windows and Unix line endings?
A line ending alone is not counted as a change, and a note says the two texts use different endings. A missing line break at the very end does count, as it does in git, because the last line then differs, and a note says which side lacks it.
What do the word changes show?
When a line was changed and not replaced, the words that differ are picked out inside it. Words are split by your browser's own rules for each language. When two paired lines have little in common, or a line is over 4,000 characters, the whole line is marked.
Can it compare PDF or Word files, or whole folders?
No. It compares plain text in UTF-8 or UTF-16, including code, and refuses other files rather than guess. It does not compare folders, and it does not merge the two sides.