Diff

How to Compare Two Texts

Published June 12, 2026 · 3 min read · By DownloadReels

Comparing two texts means finding which lines were added, removed or left unchanged between them. A diff does this automatically by finding the longest sequence of lines the two share, then marking everything else as a change. To compare text, paste both versions into a diff tool. Here is how it works and when it helps.

1
Paste both versions

Put the original on the left and the changed text on the right.

2
Compare

The tool aligns matching lines and highlights the rest.

3
Read the result

Added lines are green, removed lines are red, unchanged lines give context.

4
Copy

Share the diff in a review or paste it into notes.

How a line diff works

A diff computes the longest common subsequence of lines — the most lines that appear in the same order in both texts — and treats those as unchanged. Everything left in the original is “removed”, and everything new in the changed version is “added”. That’s the same approach git diff uses. The text diff tool shows it colour-coded.

When is comparing text useful?

Spotting what changed between two config files, two drafts, two API responses or two logs. Enable “ignore whitespace” so re-indentation doesn’t clutter the result. Comparing structured data instead? Use the JSON diff.

Tip: For prose, paste with one sentence per line — a line-based diff then reads almost like tracked changes, instead of flagging a whole paragraph as changed.

Compare text now

Paste two versions and see exactly what changed — free, in your browser.

Open the Text Diff tool →

Frequently Asked Questions

How do I compare two texts?

Paste both into a diff tool. It aligns matching lines and marks the rest as added or removed.

Can it ignore whitespace?

Yes — turn on “ignore leading/trailing spaces” so indentation changes don’t show as differences.

Is my text uploaded?

No — the comparison runs in your browser.

Related guides