Text Diff
Paste two versions of a text and see exactly what changed — added lines in green, removed lines in red, and the changed words inside each line highlighted. Switch between unified and side-by-side views, ignore case or whitespace noise, and export a real .diff patch.
- Published
- Last reviewed
Tool Summary Answer Block
This tool accepts structured input and returns deterministic output in the browser with no server upload.
- Tool name
- Text Diff
- Input intent
- Provide source content to transform, validate, or analyze.
- Output intent
- Receive normalized output suitable for copy, reuse, or debugging.
- Example input
- The quick brown fox jumps over the lazy dog
- Example output
- - jumps over the lazy dog + leaps over the sleepy dog
Tool Introduction
Paste two versions of a text and see exactly what changed — added lines in green, removed lines in red, and the changed words inside each line highlighted. Switch between unified and side-by-side views, ignore case or whitespace noise, and export a real .diff patch.
Tool Overview
The Text Diff tool computes the longest common subsequence between the two inputs to produce a minimal, readable line diff, then runs a second word-level pass over each changed line so you can spot the exact words that differ instead of rescanning whole lines. A similarity score tells you at a glance how close the two versions are. The ignore-case and ignore-whitespace options filter out changes you don't care about — capitalization edits, re-indented code, or collapsed spacing — while still displaying the original text. Output comes in two flavors: a quick unified listing for pasting into chat or a code review, and a standards-compliant unified diff (with ---/+++ headers and @@ hunks) that git apply and patch understand, downloadable as a .diff file. Everything runs client-side in your browser; neither text is ever uploaded.
Use Cases
- Review edits between two drafts of an article, contract, or email before publishing
- Compare configuration files or environment settings across two deployments
- Check what a colleague (or an AI assistant) actually changed in a rewritten paragraph or code snippet
- Verify that a copy-paste between systems didn't silently alter whitespace or wording
- Generate a .diff patch from two file versions when you don't have git at hand
Input/Output Examples
The quick brown fox jumps over the lazy dog
- jumps over the lazy dog + leaps over the sleepy dog
Hello World vs hello world (ignore case + whitespace on)
0 additions, 0 deletions — texts are identical
Two versions of a config file
--- original +++ changed @@ -3,7 +3,7 @@ -timeout = 30 +timeout = 60
FAQ
Is this a character-level or line-level diff?+
What do the Ignore case and Ignore whitespace options do?+
How is the similarity percentage calculated?+
Can I apply the downloaded .diff file with git or patch?+
What is the difference between Unified and Split view?+
Can I use it on code or large files?+
Is my text uploaded anywhere?+
Explore More Tools
Discover related utilities in the Text category below.
Related tools
Handpicked utilities you might find useful