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.