Text Diff Viewer
Compare two texts and highlight added and removed lines instantly.
How to Use
- 1Paste original text
Copy and paste your original (before) text into the left panel.
- 2Paste modified text
Copy and paste the modified (after) version into the right panel.
- 3See differences highlighted instantly
The diff output updates in real time as you type, showing exactly what changed.
- 4Green = added, Red = removed
Green lines with a "+" prefix are lines added in the modified text. Red lines with a "−" prefix are lines removed from the original.
Common Use Cases
Code Review
Compare two versions of a code snippet to spot changes before submitting a pull request or reviewing a patch.
Document Comparison
Identify edits between drafts of a document, contract, or report without manually reading through both.
Configuration Diffs
Diff server configs, environment files, or JSON settings to catch unintended changes between deployments.
Proofreading
See exactly what words or lines changed between an original draft and an edited version of any written content.
Frequently Asked Questions
How does the diff algorithm work?
The tool uses the Longest Common Subsequence (LCS) algorithm to find the maximum set of lines that are identical in both texts, then marks everything else as added or removed.
Is my text sent to any server?
No. All comparison happens entirely in your browser using JavaScript. Your text is never sent to our servers.
What does green and red highlighting mean?
Green lines with a "+" prefix are lines that exist in the modified text but not in the original. Red lines with a "−" prefix are lines present in the original but absent from the modified version.
Is there a text size limit?
For very large texts the tool falls back to a simple line-by-line comparison to stay responsive. There is no hard character limit.
Does the diff work on a word or character level?
The comparison is line-based — each line is treated as a single unit. This matches the behavior of standard diff tools like Git diff.