Text Compare (Diff Checker)

Compare two versions by line or word. Everything stays in your browser.

About this tool

A text difference checker compares two versions of the same text and shows you exactly which lines were added, removed or left untouched. Instead of re-reading both versions side by side, you see a colour-coded diff: green for additions, red for deletions.

This tool uses a longest-common-subsequence algorithm — the same family of algorithms behind git diff — so it aligns matching lines intelligently rather than comparing line 1 to line 1. Insert a paragraph in the middle and the rest of the document still lines up correctly.

The comparison runs entirely in your browser. That matters when you are diffing contract drafts, medical notes, source code or anything else you would rather not paste into someone else's server.

How to compare two texts

  1. 1Paste the original version into the left box — the earlier draft, the deployed config, the file you started with.
  2. 2Paste the changed version into the right box. The diff appears immediately; there is no button to press.
  3. 3Read the result: green lines with a + were added, red lines with a − were removed, and unmarked lines are identical in both versions.
  4. 4Check the summary counts above the diff to see how many lines changed in total.

What this tool does

Line-by-line diff

Additions and deletions are highlighted in place, with the surrounding unchanged context kept visible so you can see where each change belongs.

Smart line alignment

An LCS algorithm matches identical lines even when content is inserted or deleted earlier in the text, so a single added paragraph does not mark everything after it as changed.

Live comparison

The diff recalculates as you type or paste. No submit button, no page reload, no waiting for a server round trip.

Nothing is uploaded

Both texts stay in your browser's memory and are discarded when you close the tab. Suitable for confidential documents, contracts and source code.

Frequently asked questions

How does a text difference checker work?

It splits both texts into lines and finds the longest sequence of lines that appear in both, in the same order. Everything outside that sequence is reported as either an addition (present only in the second text) or a deletion (present only in the first).

Can I compare two documents like Word files?

This tool compares plain text. To diff documents, copy the text out of each document and paste it into the two boxes. Formatting, fonts and images are not compared — only the words.

Does it show differences within a line?

Yes. Choose Line for paragraph and code changes, or Word to highlight the exact words and punctuation that were added or removed.

Is there a limit on text length?

There is no artificial line limit. For very large inputs, the tool automatically switches to a memory-bounded comparison strategy so the browser stays responsive; practical limits depend on your device.

Is my text sent to a server?

No. The entire comparison happens in your browser with JavaScript. Nothing is uploaded, stored or logged — you can confirm this by disconnecting from the internet after the page loads; the tool keeps working.

Can I use it to compare code?

Yes. Line-based diffing is exactly how version control systems compare source files, so it works well for code, configuration, JSON, CSV and logs. Whitespace differences are treated as real differences, as they are in git.

Why do two lines that look identical show as different?

Almost always invisible characters: trailing spaces, a tab instead of spaces, or different line endings (CRLF from Windows versus LF from Unix). The comparison is exact, so these count as changes.

Does it work on mobile?

Yes. The two input areas stack vertically on small screens and the diff output scrolls horizontally when lines are long.

Related tools