Text Diff
Compare two text blocks line by line to find additions, removals and changes in code, documents or plain text.
Your result will appear here.
Text Diff online
Compare two blocks of text line by line and see exactly which lines changed — the quick way to check what an edit actually did to a document, a config or a list.
How to use this tool
- Paste the original text into the first box (Text A).
- Paste the revised text into the second box (Text B).
- Click Run Tool. Lines are compared position by position and the differences are listed.
Common uses
Checking what changed between two versions of a paragraph or a terms page, comparing a config file before and after an edit, verifying that a find-and-replace touched only what it should, and reviewing a contributor's revision without diff software.
How it works
The comparison is positional and line-based: line 1 of A is compared with line 1 of B, line 2 with line 2, and so on through the longer of the two. Lines that match are reported as unchanged; positions where the texts differ are shown as a change, and lines beyond the end of the shorter text count as added or removed. The strength of this scheme is simplicity and speed; its known weakness follows from the same design — insert one line near the top and every line below it shifts position, so the rest of the document reports as changed even though its content merely moved.
Worked example
Compare
A: The meeting is on Monday.
Bring the report.
B: The meeting is on Tuesday.
Bring the report.and the result reports one changed line (Monday → Tuesday) and one unchanged. Now insert a new first line into B and the same content reports very differently: every position mismatches, because the comparison is by line number, not by content alignment. For documents with insertions, a sequence-aware diff (git diff, a word processor's compare) realigns first; for same-shape revisions — the common case of edited-in-place text — the positional answer is exact.
Privacy and browser processing
Both texts are compared in your browser with JavaScript — they are never uploaded or stored.
Frequently asked questions
Why does one inserted line make everything "changed"?
Because the comparison aligns by line number. Line 5 of A is compared with line 5 of B even if A's line 5 is B's line 6. The tool is designed for revisions that keep the document's shape; for restructured documents use a diff that aligns content (LCS-based), like git's.
Does it compare word by word within a line?
The unit of comparison is the whole line: a one-character edit and a full rewrite of a line both register as "this line changed". The two versions of the line are shown so your eye can find the differing words.
Are trailing spaces and case differences detected?
Lines are compared as exact text, so a trailing space or a changed capital makes the line "changed". That strictness is usually what you want in config and code comparisons; for prose, eyeball the shown pair before treating it as a real edit.
Which side is "original"?
Text A is treated as the base and B as the revision — additions are lines B has beyond A, removals the reverse. Swapping the boxes inverts the report.
Are my texts uploaded?
No. The comparison runs in your browser; both texts stay on the page.