Comparing two versions of text is essential for code reviews, document editing, and tracking changes. This tool highlights additions, deletions, and modifications between two texts using a side-by-side or unified diff view. It works with any text - code, prose, configuration files, or data - and processes everything locally in your browser.
Paste the original text on the left and the modified text on the right. The tool instantly highlights additions (green), deletions (red), and unchanged lines. Both side-by-side and unified diff views are shown. You can ignore trailing whitespace or case differences to focus on meaningful changes. Line numbers are shown for easy reference when discussing specific changes.
Text comparison is essential for code reviews - seeing exactly what changed between two versions. Developers use it to compare configuration files before and after changes, verify deployment scripts, review database migration files, compare API response changes between versions, diff translation files for localization, and validate that code generation tools produce the expected output.
The diff algorithm implements an LCS-based (Longest Common Subsequence) difference algorithm to find insertions and deletions needed to transform one text into another. Character-level highlighting within changed lines uses a secondary diff pass on each changed line pair. The tool handles Unicode text, mixed line endings, and large texts efficiently.
The tool uses a diff algorithm (similar to Git's) to find the minimal set of changes between two texts. Added lines are highlighted in green, removed lines in red, and unchanged lines are shown in their original form.
Yes. The tool works with any text including source code, Markdown, JSON, YAML, and configuration files. It compares line by line and highlights the exact characters that differ within changed lines.
Unified diff shows changes inline with + and - markers (like Git). Side-by-side diff shows the two texts in parallel columns for easier visual comparison.
Transform, format, generate, and encode data instantly. Private, fast, and always free.
Browse All Tools