Text Diff

Compare two texts line by line and highlight added, removed, and edited parts. The diff updates as you type. Nothing is uploaded.

Free
No signup
Instant
Private

1. Original text

Lines: 2 Characters: 26

2. Changed text

Lines: 2 Characters: 26

Comparison result

+ 0 Added

− 0 Removed

~ 1 Edited

= 1 Unchanged

Diff view

+ AddedRemoved~ Edited= Unchanged

What changed?

~ L1: hello world

= L2: keep this line

3. Differences (Side by side)

1
~
hello world
2
keep this line
1
~
hello there
2
keep this line

Your data stays private

Everything is processed locally in your browser. We never upload or store your content.

Learn more about privacy →

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

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.