⚖️

Text Diff

Compare two texts line by line. Added lines are highlighted green, removed lines red. Works entirely in your browser —nothing is uploaded.

Text Tools Runs locally No data sent
compare textdiffline diffbrowser only
Original
Modified
Diff Output
Paste text in both fields and click Compare

What is Text Diff?

Text Diff compares two blocks of text line by line and shows which lines were added, removed, or unchanged. It uses an LCS algorithm entirely in your browser. Switch between unified, added-only, and removed-only views and copy the diff output as plain text.

How to Use Text Diff

  1. Paste the original text in the left panel.
  2. Paste the modified text in the right panel.
  3. Click Compare (or press Ctrl+Enter).
  4. Use the view buttons to filter by Added only or Removed only.
  5. Copy the diff output if needed.
About Text Diffing ▾
Example
Input Original line A / Shared line
Output Removed: "Original line A" / Added: "line B" / Unchanged: "Shared line"
Common Use Cases
  • Compare two versions of a document
  • Review config file changes before deploying
  • Spot differences between API responses
  • Find accidental edits in copied text
Frequently Asked Questions
How does the diff work?

It uses a Longest Common Subsequence (LCS) algorithm to find the minimum set of line additions and removals that transform the original into the modified text.

Can I filter to show only added or removed lines?

Yes. Use the Added only or Removed only view buttons to focus on one type of change.

Is my text sent to a server?

No. All comparison happens locally in your browser. Neither input is uploaded anywhere.

Does it support character-level diff?

Currently it diffs at the line level. Character-level highlighting within changed lines is not shown.