Diff Checker (Compare Text)
Compare two texts and see what changed, line by line and word by word, side by side or inline. Copy or download the changes as a unified diff.
3 lines added, 2 removed.
| Original line | Original | Changed line | Changed |
|---|---|---|---|
| 1 | Hello team, | 1 | Hello team, |
| 2 | 2 | ||
| 3 | Removed: The release is planned for | 3 | Added: The release is planned for Tuesday. |
| 4 | Removed: Please test the login page and the | 4 | Added: Please test the login page, the search and the new checkout. |
| 5 | Report any bugs in the tracker. | 5 | Report any bugs in the tracker. |
| 6 | Added: Send screenshots if you can. | ||
| 6 | 7 | ||
| 7 | Thanks, | 8 | Thanks, |
| 8 | Ana | 9 | Ana |
Runs in your browser. Nothing you enter is uploaded.
How to use
This tool compares two texts and shows what changed, line by line, with the changed words highlighted.
- Paste the older version into Original and the newer one into Changed, or open files for them; a file dropped on the page goes to Original. Swap switches them.
- The comparison updates as you type. Removed lines are red and added lines are green. Inside a changed line, the words that differ are highlighted, or single characters with Highlight set to Characters, for IDs and numbers.
- Choose Side by side to see both versions next to each other, or Inline to read all changes in one column. On a phone the tool starts with inline.
- Long runs of unchanged lines are folded away. Click Show 12 unchanged lines (or however many) to open one. Next change and Previous change go from one change to the next.
- Turn on Ignore whitespace to treat changes in spacing and indentation as no change, or Ignore case to treat "Hello" and "hello" as the same.
- Copy unified diff copies the changes in the standard format that Git and patch use. Download .diff saves them as a file.
A last line without a line break counts as different from the same line with one, as in other diff tools, and the tool points this out. Each text can have up to 50,000 lines. Large texts are compared in the background, so the page stays responsive.
Frequently asked questions
What is a unified diff?
It is the standard text format for changes, used by Git, patch and code review tools. Lines starting with - were removed, lines starting with + were added, and the @@ lines say where each change is.
Why is a whole line marked when only one word changed?
Diffs compare line by line first, so a line with any change counts as removed and added. Inside it, the tool highlights the words that actually differ, so you can see the exact change.
Can I compare two files?
Yes. Use Open the original and Open the changed one to pick the two files, or drop them on the boxes. Nothing is uploaded or saved anywhere: the comparison runs in your browser, and the texts are gone when you close the page.
Related tools
More text tools
- Case converter Convert text to camelCase, snake_case, kebab-case, Title Case, Sentence case, UPPER or lower case.
- Slug generator Turn titles into clean URL slugs.
- Regex tester Test JavaScript regular expressions with matches highlighted as you type.