Skip to content
ToolDesk

Text Diff

Compare two texts line by line. Additions and deletions shown in color.

Dev

About this tool

The text diff tool compares two texts line by line and highlights additions and removals in color. Comparison runs in your browser and your input is never sent anywhere. Line-level comparison has its own quirks, so here is how to read the results correctly.

Unchanged, added, and removed lines by color

It matches the two texts line by line and distinguishes unchanged, added, and removed lines by color. A single-character change or a swapped line is easy to miss by eye, so having the differences stand out visually is the main benefit.

A "move" looks like a delete plus an add

Even just moving a paragraph or block elsewhere can show, in line-level comparison, as "removed at the old position" and "added at the new position". It is not recognized as a move, so keep that in mind.

Whitespace and line-ending differences count too

Trailing spaces, added or removed blank lines, CRLF vs LF line endings, and full-width vs half-width differences all show as different lines. If there are too many unintended diffs, remove stray whitespace with a text tidy tool before comparing so the meaningful changes are clearer.

Same meaning, different wording still diffs

Because it is a mechanical character comparison, paraphrases and spelling variations show as differences. Use it knowing it checks character-level matching, not whether the content means the same thing.

How to use

  1. Enter the “Before” and “After” text in each field.
  2. They are compared line by line, with additions, deletions and replacements shown in color. Replaced lines highlight only the parts that actually changed.
  3. Use “Side by side”, “Line numbers” and “Collapse unchanged” to switch the view (your choice is remembered).
  4. The number of additions and deletions is also counted.

FAQ

Is the text I enter sent to a server?

No. All comparison is processed in your browser, so the text you enter never leaves your device — safe even for confidential documents.

Is it a line-level or character-level comparison?

It detects additions and removals at the line level. It is better for getting an overview of which lines changed than for pinpointing what changed within a single line.

Do case and full-width/half-width differences count as changes?

Yes. If characters differ, the lines are treated as different. To ignore such variations, normalize the text before comparing so the diff is easier to read.

Are whitespace and line-break differences detected?

Yes. Trailing spaces and added or removed blank lines show up as differences. If there are too many unintended diffs, remove stray whitespace beforehand.

What is it useful for?

Reviewing source code changes, comparing revised documents and terms, checking translations before and after, and polishing drafts — comparing text of all kinds.

Can it compare long texts?

Yes, within the limits of your browser memory. Extremely long texts may render slowly depending on your device.

Embed this tool on your site

Copy and paste the code below to embed this tool on your website or blog.

<iframe src="https://tooldesk.dev/embed/en/tools/text-diff" width="100%" height="600" style="border:1px solid #e5e7eb;border-radius:12px;max-width:640px" loading="lazy" title="Text Diff — ToolDesk" allow="clipboard-write"></iframe>
<p style="font-size:12px"><a href="https://tooldesk.dev/en/tools/text-diff" target="_blank" rel="noopener">Text Diff</a> by <a href="https://tooldesk.dev" target="_blank" rel="noopener">ToolDesk</a></p>