Text Diff
Paste an original and a changed version to see which lines were removed and which were added. The comparison is computed locally.
Output
🔒 Runs in your browser. Your data is never uploaded.
How to use
- Paste the original text in the first box.
- Paste the changed text in the second box.
- Read the result: removed lines are marked −, added lines +.
Line-based comparison
The diff compares whole lines using a longest-common-subsequence algorithm, the same idea behind git diff. A line that changed by one character appears as one removal and one addition.
Frequently asked questions
- Why does every line show as changed?
- The two texts probably use different line endings or indentation (tabs vs spaces), which makes otherwise equal lines differ.
- Can I compare JSON?
- Yes. Format both documents first, with sorted keys, so that only real differences remain.
- Is there a size limit?
- Comparison cost grows with the product of the two line counts. A few thousand lines per side is instant; much larger inputs may be slow.
Related tools
- Remove Duplicate LinesRemove duplicate lines from a list while keeping the original order.
- JSON Formatter & ValidatorFormat, validate and minify JSON in your browser.
- Word CounterCount words, characters, sentences, paragraphs and reading time as you type.
- Case ConverterConvert text between UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case and kebab-case instantly.