Text diff

Compare two texts and see the differences between them.

Enable JavaScript to use the interactive tool. The guide below explains how it works.

Text Diff

What it does

Text Diff places two pieces of text side by side and highlights exactly what was added, removed or changed between them. Paste the original on one side and the modified version on the other; differences are marked line by line and, within changed lines, character by character.

Why someone uses it

Step-by-step instructions

  1. Paste the original text into the left pane.
  2. Paste the changed text into the right pane.
  3. Scan the highlighted lines. Removed content is marked on the left, added content on the right.
  4. Edit either pane and the comparison updates live.

Examples

Left: timeout = 30 / retries = 3 Right: timeout = 60 / retries = 3 / debug = true

The diff flags line 1 as changed (30 → 60), shows line 2 as identical, and shows line 3 as an addition.

Understanding the results

Unhighlighted lines are identical on both sides. Highlighted lines differ; inside those lines, the exact characters that changed are emphasised so you do not have to hunt for a single altered digit. A line that appears only on one side was inserted or deleted. Diffs are computed on the text as given, so differences in trailing spaces, tabs versus spaces, or Windows (CRLF) versus Unix (LF) line endings will show up as changes even though they look the same on screen.

FAQs

Common mistakes

Use cases

Related tools

All tools

Guides and articles