Text Diff
Compare two texts line by line and highlight added, removed, and edited parts. The diff updates as you type. Nothing is uploaded.
1. Original text
2. Changed text
Comparison result
+ 0 Added
− 0 Removed
~ 1 Edited
= 1 Unchanged
Diff view
What changed?
= L2: keep this line
3. Differences (Side by side)
Your data stays private
Everything is processed locally in your browser. We never upload or store your content.
About comparing two texts
Text Diff computes a line-oriented difference: added, removed, and edited lines, then paints segments inside a line when only part of it changed. Side-by-side, unified, and inline views update as you type. There is no Run or Compare button. Empty-on-both-sides is allowed so you can start from scratch; the classic execute() still asks for at least one side.
Use it for config files, paragraphs, or logs. For structured JSON with a tree view, open JSON Compare. For replacing a string rather than viewing a diff, use Find & Replace. Whitespace and line endings matter — two lines that look equal in a proportional font may still differ by a trailing space.
Both panes stay in the browser. Nothing is uploaded. Close the tab to discard the drafts.
How to use
Paste original text
Paste or open the first draft on the left.
Paste changed text
Paste the second draft on the right. Swap the two sides anytime.
Review the diff
Counts, the change list, and the diff update as you type.
Copy or download
Copy the unified diff or download it as a file. Nothing is uploaded.
Related text tools
JSON Compare
Compare two JSON objects side by side and visualize the differences. Find added, removed, and modified values instantly.
Find & Replace
Find and replace text in your browser with literal, regex, or multiple pair modes. The result updates as you type. Nothing is uploaded.
Regex Tester
Test a JavaScript regular expression against sample text and list every match. Flags are limited to g, i, m, s, u, and y. Nothing is uploaded.
Sort Lines
Sort lines alphabetically A–Z or Z–A. Type or paste below — the result updates as you type.
Remove Duplicate Lines
Keep the first occurrence of each unique line. Type or paste below — the result updates as you type.
Markdown Preview
Write Markdown on the left and see a live preview on the right. Rendering stays in your browser.
Text Diff FAQ
It is a line-oriented LCS. An unchanged line is equal. A line that exists only on the right is added; only on the left is removed. When a removed line is paired with an added line, both counters increment and edited increments once, then inner tokens are painted. Side-by-side, unified, and inline views update as you type — there is no Compare button. Whitespace and line endings matter. Empty-on-both-sides is allowed on this page so you can start from scratch.
Use JSON Compare when both sides are JSON documents and you want a tree, path list, or key-aware added/removed/modified. Use Text Diff for configs, logs, and paragraphs. For replacing a string rather than viewing a diff, use Find & Replace.
No. Both panes stay in the browser. Close the tab to discard the drafts. Nothing is stored on a server.