Text Diff Tool

Compare two texts and see the differences highlighted

Diff Result

What is a Text Diff?

A text diff (or text comparison) shows the differences between two pieces of text. Lines that were added are shown in green, lines that were removed are shown in red, and unchanged lines provide context. This is the same format used by version control systems like Git.

How to Use This Tool

Paste the original text in the left box and the modified text in the right box, then click "Compare." The unified diff output will show additions with a "+" prefix in green and deletions with a "-" prefix in red. Use the "Swap" button to reverse the comparison direction.

API Access

Compare text programmatically: POST /api/diff/text with a JSON body containing "text_a" and "text_b" fields. Returns a unified diff string with change statistics.

Get a free API key for 100+ developer endpoints:
Pro plans
ToolPipe JSON Formatter CSS Minifier JS Minifier UUID Generator Regex Tester JWT Decoder Password Generator Hash Generator Base64 JSON to YAML QR Generator Merge PDF Image to Base64 Color Picker My IP XML Formatter YAML Validator CSV to JSON Diff Checker SQL Formatter Free API Key Pro Plans Quick Start
130+ free developer tools by ToolPipe. No signup, no tracking. Support us