Text Diff Checker

Paste two versions of a text to see exactly what was added, removed or left unchanged. Compare by line, like a code review, or by word, like tracked changes. You can ignore case and whitespace differences and copy the result as a standard unified diff. The comparison runs in your browser; your texts are never uploaded.

Processed locally in your browser. Your data is not uploaded to our servers.

Compare by
SettingsDefault settings

Differences

Examples

Word mode marks changes inline. Copying with markers writes removed text as [-text-] and added text as {+text+}:

OriginalModifiedCopied with markers
the quick brown foxthe slow brown dogthe [-quick-]{+slow+} brown [-fox-]{+dog+}
Total: 10 itemsTotal: 12 itemsTotal: [-10-]{+12+} items

Removed text is struck through and marked โˆ’; added text is underlined and marked +.

Formula & Methodology

The tool finds the shortest list of insertions and deletions that turns the first text into the second, using Myersโ€™ diff algorithm, the one behind git diff. In line mode each line is one unit; in word mode words, spaces and punctuation are units.

@@ -start,count +start,count @@-removed line+added line

Case and whitespace options only change how pieces are compared. The text that is shown is always the real text.

Notes and limitations

  • A diff shows the smallest set of edits, not necessarily the edits a person made: moved text appears as removed in one place and added in another.
  • Up to 2,000,000 characters and 200,000 lines or words are accepted. If two texts differ almost entirely, the changed region is shown as one block removed and one block added.
  • Line breaks of any kind (Windows, Unix or old Mac) are treated alike, and a final line break does not count as an extra line.
  • The unified diff has the same format as diff -u and git diff, with 3 lines of context, and can be used with the patch command.
  • Only plain text is compared. Pasted formatting is lost, and files are not read.

How to Use

  1. Paste the original text in the left box and the modified text in the right box.
  2. Choose to compare by lines or by words, and set the case and whitespace options.
  3. Read the highlighted differences and the counts of added, removed and unchanged pieces.
  4. Use โ€œShow only the changesโ€ to hide long unchanged stretches.
  5. Copy the unified diff (or the marked text in word mode) or download it.

Frequently Asked Questions

Are my texts uploaded?

No. The comparison runs in your browser and nothing you paste is sent to ToolQuarter, analytics or any other service.

What is the difference between comparing by lines and by words?

Line mode treats each line as a unit, like a code review: a changed word marks the whole line as changed. Word mode compares individual words and punctuation, which suits prose and shows small edits inside a line.

How do I ignore differences in spacing?

Use the Whitespace option: ignore trailing spaces, ignore differences in the amount of spaces, or ignore all whitespace. Ignoring case is a separate option. The shown text is always the real text.

What is a unified diff?

It is the standard text format for changes, used by diff -u and git. Lines starting with - were removed, lines starting with + were added, and @@ lines show the positions. You can paste it into a code review or apply it with the patch command.

Why is moved text shown as removed and added?

A diff works out the fewest insertions and deletions and does not track moves. A paragraph you moved therefore appears deleted in the old place and inserted in the new one.

Last updated: