How to compare two texts
- Paste the original — the older version — into the first box, and the changed version into the second. The comparison updates as you type.
- Read the colors: lines only in the original are red, lines only in the changed text are green, and inside a line that was edited the exact words that differ are highlighted more strongly. The summary counts removed and added lines.
- Switch the view between Side by side (the two versions next to each other, the default on wide screens) and Unified (one column with − and + lines, the default on phones).
- Ignore what doesn’t matter: tick the options to treat runs of spaces and tabs as one space, or to ignore upper and lower case.
How the comparison works
The diff checker first compares the texts line by line. It uses Eugene Myers’ difference algorithm (1986), the default in tools such as Git: it finds the smallest set of lines to remove and add that turns the original into the changed text, so unchanged lines line up even when lines were inserted or deleted in between. Long stretches without changes fold away, leaving three lines of context around each change; a button shows them again.
Next, within each block of changes, a removed line and an added line that share at least half their words are shown as one edited line, and the same algorithm runs again on their words, spaces and punctuation. That is how a single changed number in a long paragraph stands out. Lines with little in common are shown as a plain removal and addition, so you don’t get a confusing patchwork of highlights.
Worked example
The sample in the boxes is a short meeting note. The comparison finds four changes:
- Line 1 was edited: only
00→ 30 is highlighted, because the meeting moved from 9:00 to 9:30. - “Lunch will be provided.” was removed.
- The questions line was edited: “or Priya” was added after “Email Sam”.
- “Parking is free after 6 pm.” is new at the end.
The summary reads 3 removed and 3 added: an edited line counts once on each side, the way most diff tools count, alongside the removed and the new line. The line “Please bring your laptop and the Q3 report.” is the same in both and stays white.
Tips for common comparisons
- Code and configuration files: paste whole files. Use Ignore differences in spaces and tabs when only the indentation changed.
- Word, Google Docs or PDF documents: copy the text from each version. Each paragraph becomes one long line, and the word highlights show what changed inside it.
- JSON: run both versions through the JSON formatter with the same settings first, ideally with sorted keys, so the comparison sees one value per line.
- Lists (names, email addresses, product codes): sort both lists the same way before pasting so that order doesn’t show up as a change.
- Essays and articles: the word counter tells you how much each version grew or shrank.
Limits
- A moved line or paragraph shows as removed in one place and added in another; the checker doesn’t detect moves.
- “Ignore spaces and tabs” doesn’t ignore line breaks: text rewrapped into different lines still shows as changed.
- Thousands of lines compare in a fraction of a second when the texts are similar. If two long texts are almost entirely different, the comparison stops after a second and shows the rest as removed and added.
- A final line break at the end of a text is not counted as an extra line.
Your texts stay on your device
The comparison runs in your browser, so contracts, source code and other confidential text are never uploaded or logged. Nothing is saved either: reloading the page clears both boxes.
Frequently asked questions
Is the text I paste uploaded anywhere?
No. The diff checker runs entirely in your browser with JavaScript. Your texts aren’t sent to a server, aren’t stored, and are gone when you reload or close the page.
What do the red and green colors mean?
Red marks what is only in the original text (removed), green what is only in the changed text (added). Inside an edited line, the darker highlight marks the exact words or characters that differ.
Why does a moved paragraph appear as removed and added?
A line-by-line comparison finds the shortest list of removals and additions, and a move is exactly that: the paragraph disappears in one place and appears in another. Look for an identical red block and green block to spot moves.
What does “ignore differences in spaces and tabs” do?
It treats any run of spaces and tabs as a single space and ignores spaces at the start and end of each line, so re-indented code or doubled spaces don’t count as changes. Line breaks still count.
How is this different from git diff?
Both use the Myers algorithm to match lines. Git compares files in a repository and prints a unified diff for programs and terminals; this page compares any two texts you paste, adds word-level highlights and a side-by-side view, and needs nothing installed.
Last updated: October 15, 2026