Skip to content
ToolDesk

Text Diff

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

Dev

About this tool

This text diff tool compares two texts line by line and highlights, in color, what was added and what was removed. It helps when you want to check a document before and after proofreading, compare an old and new config file, or spot the difference between two pasted passages. All comparison runs in your browser, so the text you enter is never sent to a server.

Comparing two passages by eye makes it surprisingly easy to miss a single-character change or a swapped line. This tool matches the two texts line by line and distinguishes unchanged, added, and removed lines. Because the differences stand out visually, you can be confident you have caught every change.

To use it, simply paste the two texts you want to compare into their input areas. It works for any text — program source code, revised contracts and terms, before-and-after translations, or draft emails you are polishing. Because it compares line by line, it is well suited to tracking added or removed paragraphs and items.

The diff is a mechanical comparison based on line matches. Text that means the same but is written differently will still show as a difference, and even whitespace or line-break changes are detected. If you see too many unintended differences, tidying up stray spaces and blank lines before comparing makes the meaningful changes easier to see.

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.