Text Diff

Text Diff / Compare

Compare two texts side by side. Highlight additions, deletions, and changes.

100% private - everything runs in your browser, no data is sent anywhere

Was this tool helpful?Report an issue

Related Tools

Compare Two Texts and Find the Differences

A diff (short for difference) shows what changed between two versions of text. The concept originates from the Unix diff utility and is the foundation of version control systems like Git. This tool applies the same logic to any text you paste - code, documents, configuration files, or plain prose.

How to Read a Diff

  • Additions (highlighted in green) - lines present in the new version but not the old
  • Deletions (highlighted in red) - lines present in the old version but removed in the new
  • Modifications - shown as a deletion of the old line followed by an addition of the new line
  • Context lines (unchanged) - surrounding lines that help you locate where the change occurred

Common Use Cases

  • Code review - compare two versions of a file to see what changed in a pull request or commit
  • Document comparison - spot changes between contract drafts, policy revisions, or email templates
  • API debugging - compare expected vs actual API responses to find discrepancies
  • Configuration auditing - verify what changed in a config file after a deployment or update
  • Content editing - track revisions between drafts of articles, blog posts, or marketing copy

Frequently Asked Questions

How does the text diff tool work?+
Paste two versions of text into the left and right panels. The tool highlights additions (green), deletions (red), and modifications so you can see exactly what changed between the two versions.
What can I use the text diff tool for?+
Common use cases include code review (comparing versions of a file), document comparison (contract drafts, policy revisions), API debugging (expected vs actual responses), configuration auditing (what changed after a deployment), and content editing (tracking revisions between drafts).
Can I compare code files?+
Yes. The diff tool works with any text including source code in any language, JSON, XML, configuration files, SQL, and more. It highlights differences at the line level.
What do additions, deletions, and modifications mean?+
Additions are lines present in the new version but not the old. Deletions are lines present in the old version but removed. Modifications are shown as a deletion of the old line followed by an addition of the new line.
Is my text stored anywhere?+
No. All comparison happens in your browser. The text you paste is never sent to any server.