- Home
- Diff checker
Diff checker
Paste the original and the changed version. You will see every added, removed and edited line, with the changed words marked.
Differences
| 1 | Dear team, | 1 | Dear team, |
| 2 | 2 | ||
| 3 | Our quarterly review | 3 | Our quarterly review has moved to Thursday at 14:00. |
| 4 | Please bring your project updates and any open questions. | 4 | Please bring your project updates and any open questions. |
| 5 | The meeting will take place | 5 | The meeting will take place online. |
| 6 | Lunch will be provided afterwards. | 6 | Send me your slides by Wednesday evening. |
| 7 | 7 | ||
| 8 | Thanks, | 8 | Thanks, |
| 9 | Sam | 9 | Sam |
| 1 | 1 | Dear team, | |
| 2 | 2 | ||
| 3 | − | Our quarterly review | |
| 3 | + | Our quarterly review has moved to Thursday at 14:00. | |
| 4 | 4 | Please bring your project updates and any open questions. | |
| 5 | − | The meeting will take place | |
| 6 | − | Lunch will be provided afterwards. | |
| 5 | + | The meeting will take place online. | |
| 6 | + | Send me your slides by Wednesday evening. | |
| 7 | 7 | ||
| 8 | 8 | Thanks, | |
| 9 | 9 | Sam |
How to compare two texts
- Paste the original text on the left and the changed version on the right, or open a file on each side.
- The comparison appears below and updates as you type. For very long texts, press Compare (or Ctrl+Enter).
- Read the summary: lines added, removed and changed. Inside changed lines, the exact words that differ are highlighted.
- Switch between side by side and unified views, swap the two sides, or copy the result as a patch.
Reading the result
- Red lines exist only in the original: they were removed. Green lines exist only in the changed text: they were added.
- Changed lines appear on both sides with the edited words marked in a darker shade, so you can spot a changed date or a missing “not” at a glance.
- Side by side puts the two versions next to each other, best on wide screens. Unified shows one column with − and + lines, like Git and most code review tools; phones get this view by default.
- Long stretches of unchanged lines are folded away. Click “Show unchanged lines” to open them.
How the diff works
The checker uses the Myers difference algorithm, the same idea behind Git and the Unix diff command, to find the smallest set of line changes that turns the original into the changed text. Within each block of changes it pairs removed and added lines in order: when a pair is at least 30% the same, it is shown as one changed line and compared again word by word. Otherwise it is shown as a removal and an addition.
Ignore white space treats runs of spaces and tabs as one space and ignores spaces at the start and end of lines, which helps when only the indentation changed. Ignore case treats capital and small letters as the same. Big comparisons run in a background thread of your browser, so even files of 10,000 lines do not freeze the page.
What people compare
- Two drafts of an essay, a contract or a policy, to see what an editor changed.
- Versions of code or configuration files, without opening a terminal.
- Exported lists, such as email addresses or product codes, to find what is new. Sort both lists first with the text cleaner for the cleanest result.
- Translations or subtitles against their previous version.
Questions and answers
Is my text uploaded?
No. The comparison runs entirely in your browser, and the two texts are not saved or sent anywhere. That makes it safe for contracts, code and personal documents.
How big can the texts be?
Tens of thousands of lines work well; the work happens in the background so the page stays responsive. Extremely different texts of that size are shown as larger replaced blocks rather than line by line.
Can I compare Word or PDF files?
Not directly: open the document, copy its text and paste it in. Plain text files such as .txt, .md, .csv, .json, .html and code files can be opened with the Open button or dropped onto a box.
What is a unified diff or patch?
A standard text format for changes, used by Git and code review tools: lines starting with − were removed, lines starting with + were added, and @@ headers show where each change is. “Copy as patch” copies the comparison in this format.
Why is a line shown as removed and added instead of changed?
When the two lines have less than about 30% in common, marking the changed words would highlight almost everything, so they are shown as a removal and an addition instead.
Does Ignore white space ignore blank lines?
No. It treats runs of spaces and tabs inside a line as one space and ignores them at the start and end of lines, but an extra blank line still counts as a change.