Text Diff
Paste the before and after versions of your text, then click "Compare" — changed lines appear highlighted in green and red. Works for documents, emails, code, or anything you want to track. Your text never leaves your browser.
Paste text in both fields and click "Compare" — the diff will appear here.
How to Use the Text Diff Tool
Paste your original text into the "Before" area and your revised text into the "After" area, then click the "Compare" button. The tool performs a line-by-line diff and highlights any changed lines.
- Green (added lines): Lines that exist only in the revised text.
- Red (deleted lines): Lines that exist only in the original text.
- Unchanged lines: Lines common to both texts are shown without any highlight.
- Changes within a line: When a line was replaced, only the words that actually changed are highlighted more strongly. Toggle it with "Highlight changes within a line".
- Unified or side by side: Switch to the side-by-side view to see before and after in two columns with line numbers.
- Load a file: Drop a text file onto the area below either input to fill it. The file is read in your browser and never uploaded.
- Summary badges: The number of added, deleted and changed lines is shown in the badges above the result.
For example, if you change the line port = 8080 to port = 443, the result shows a deleted line - port = 8080 (red) and an added line + port = 443 (green), with only 8080 and 443 highlighted inside them.
There is no line limit. Comparing tens of thousands of lines works directly, because the tool splits the problem using common runs and lines that appear exactly once on each side.
Useful Scenarios
- Reviewing changes between document, email, or contract revisions
- Quick diff check before a code review
- Proofreading blog posts or tracking edits in written content
- Comparing configuration files or settings text before and after changes
How to Read a Line Diff
The unit of comparison is a line: a changed line is reported as the old line removed and the new line added. Within such a pair, the words that actually differ are highlighted, so a one-character edit does not look like a wholesale rewrite. Spaces, tabs and newline positions are part of the input and can produce differences even when the text looks similar. The tool has no understanding of syntax or meaning, so it is not a substitute for a code review.
Use JSON Diff for a structural comparison that ignores object-key order, or the Invisible Character Remover when hidden characters are suspected.