Skip to content
TXT-03Stays on device

Text diff

Compares line by line, not word by word. Reflowed paragraphs show as whole changed lines.

Lines
0
Changed
0
Unchanged
0

Your text stays in this browser — it is never sent to a server.

Advertisement

Related tools

How it works

  1. You paste the original into the first box and the changed version into the second. Both stay in this tab — neither is sent anywhere.
  2. The comparison runs through jsdiff's line diff, which computes the shortest edit script between the two sequences of lines rather than comparing them position by position. That is why inserting a line at the top shows as one insertion instead of marking every line below it as changed.
  3. Removed lines are marked with a minus and tinted with the error colour; added lines are marked with a plus and tinted with the success colour. Unchanged lines are counted but not listed, so the output is the difference rather than the whole document twice.
  4. The counts above the output — lines, changed, unchanged — come from the same edit script the rows are drawn from, so they cannot disagree with what you are looking at.
  5. The routine runs on each keystroke in plain JavaScript. Nothing is written to storage and no request leaves the page.

Limitations

The comparison is line by line, not word by word. A paragraph where one word changed shows as a whole line removed and a whole line added, and you have to spot the difference yourself. For prose written as long unwrapped paragraphs, this is the tool's main weakness — a word-level diff would be more useful there and is a different algorithm.

Reflowed text is the worst case. If the second version has the same words but different line breaks — because it was pasted from a different editor, or the wrapping changed — almost every line will report as changed even though nothing was edited. Normalising both sides to one sentence per line first turns that back into a readable diff.

Whitespace counts. A trailing space, a tab that became four spaces, or Windows line endings against Unix line endings will all mark a line as changed when the visible text is identical. That is correct behaviour for code and infuriating for prose.

There is no three-way merge and no way to apply changes. This shows you what differs; taking one side over the other is manual.

Questions

Is my text uploaded?

No. Both versions stay in this tab and are compared here. Nothing is posted, logged or kept after you close it — which matters, because the things people compare are usually contract drafts and internal copy.

What are the limits?

It handles documents of several thousand lines comfortably. Very large inputs slow down because the comparison re-runs on each keystroke, and the edit-script computation grows with the size of both sides.

Why is every line marked as changed?

Almost always because the line breaks differ rather than the words. Text reflowed by a different editor, or copied out of a PDF, wraps at different points. Normalise both sides — one sentence per line is a good rule — and the real changes stand out.

Can it show which word changed within a line?

Not currently. The comparison is at line granularity, so a one-word edit shows as the whole line removed and re-added. For close editorial work on prose, a word-level diff in an editor or a word processor's track-changes view is the better instrument.

Do I need an account?

No. There is no sign-up, no email step and no usage counter. The tool is paid for by the ads on this page.

Advertisement

When people use it

The contract case is the one that brings most people here. Someone returns a document 'with a few small changes' and does not mark them. Pasting both versions in and reading the additions and removals takes a minute and finds the clause that quietly moved, which is not something you can trust yourself to spot by reading.

The other case is versions of your own work. Two drafts of the same email, a config file before and after someone edited it, a block of copy that came back from review. The diff answers 'what actually differs' without requiring either version to be a file, which is the whole reason to use a browser tab rather than a version-control tool.

Comparing two PDFs is the most common version of this question, and it needs a step first: a PDF holds positioned glyphs, not text you can paste. PDF to Word extracts the wording into an editable document, and the two extracts can then be compared here.

How it compares

Against the online diff tools, the difference is that a draft contract is never posted to a server to be compared. Against a proper diff tool — git diff, an IDE's comparison view, or Word's track changes — those win on everything structural: word-level highlighting, three-way merges, the ability to accept one side, and the history that tells you who changed it. Use this when the two versions are text on a clipboard rather than files under version control.