Text Diff
Compare two texts side by side and see the differences.
Text Diff — FAQ
How does the text diff algorithm work?
+
The diff tool uses the Longest Common Subsequence (LCS) algorithm, the same approach used by Unix diff and Git. It finds the largest set of lines common to both texts, then marks remaining lines as added (in text B but not A) or removed (in text A but not B). This produces the minimal set of changes needed to transform one text into the other.
What is the difference between line diff and character diff?
+
Line diff compares text line by line and marks entire lines as added or removed — this is what this tool does and what tools like git diff use by default. Character (or word) diff compares at a finer level, highlighting the specific characters or words that changed within a line. Line diff is easier to read for large changes; character diff is more precise for small edits.
What are common use cases for a text diff tool?
+
Common uses include comparing document versions before and after editing, reviewing code changes, checking contract revisions, verifying that two configuration files differ only in expected ways, proofreading translated text against the original, and auditing database export changes.
Is the text I enter kept private?
+
Yes. All comparison is performed in your browser using JavaScript. Neither version of your text is ever sent to any server. This makes the tool safe to use with confidential documents, proprietary code, or sensitive personal information.
Can I diff non-English or code text?
+
Yes. The diff tool works with any UTF-8 text, including text in non-Latin scripts (Arabic, Chinese, Japanese, Cyrillic, etc.) and programming code in any language. Line endings (Windows \r\n vs Unix \n) are normalized automatically to prevent false positives from encoding differences.