✍️ Text & Writing

Text Diff

Paste the before and after versions of your text, then click "Compare" — changed lines appear highlighted in green and red. Works for documents, emails, code, or anything you want to track. Nothing leaves your browser.

Examples (click to try)

Paste text in both fields and click "Compare" — the diff will appear here.

How to Use the Text Diff Tool

Paste your original text into the "Before" area and your revised text into the "After" area, then click the "Compare" button. The tool performs a line-by-line diff and highlights any changed lines.

  • Green (added lines): Lines that exist only in the revised text.
  • Red (deleted lines): Lines that exist only in the original text.
  • Unchanged lines: Lines common to both texts are shown without any highlight.
  • Summary badges: The total number of added and deleted lines is shown in the badges above the result.

For example, if you change the line port = 8080 to port = 443, the result shows two lines side by side: a deleted line - port = 8080 (red) and an added line + port = 443 (green). An edit to a line is shown as a delete plus an add pair.

Useful Scenarios

  • Reviewing changes between document, email, or contract revisions
  • Quick diff check before a code review
  • Proofreading blog posts or tracking edits in written content
  • Comparing configuration files or settings text before and after changes

Frequently Asked Questions

Is my input sent to a server?
No. All diff calculations are performed entirely in your browser. Your input is never sent to or stored on any server, so it is safe to compare confidential documents.
How is the diff calculated?
The tool uses a line-by-line LCS (Longest Common Subsequence) algorithm. Lines common to both texts are shown as-is, deleted lines are highlighted in red, and added lines are highlighted in green.
Does it work on smartphones?
Yes. It works in any browser on smartphones, tablets, and desktop computers. On small screens the two input areas stack vertically. No installation or account is required.