Compare two texts
Paste the original on the left and the new version on the right. The comparison runs locally in this tab — neither block is sent anywhere, and you can clear both afterwards. Use it to check a config change, a rewritten paragraph, or two log excerpts before you share a paste.
Nothing compared yet.
Both texts stay in this tab. Nothing is uploaded, stored or logged — the compare button only reads the two text areas. To share the result, copy the diff and paste it with the Diff / Patch language.
How the comparison works
The tool splits both texts into lines and finds the longest common subsequence, then walks the result to mark each line as unchanged, removed or added. That is the same model as diff and git diff, so the output should agree with what your editor shows. It is line-based, not character-based: a single character change marks the whole line as changed.
| Option | Effect |
|---|---|
| Ignore whitespace changes | Lines that differ only in leading, trailing or internal spaces compare as equal — useful for YAML and indentation churn |
| Empty side | Compares against an empty document, so everything on the other side shows as added |
| Large inputs | The algorithm is quadratic in the worst case; tens of thousands of lines will feel slow in the browser |
When to use a diff, and when not to
- Config changes: a diff makes an accidental deleted key obvious. Compare the redacted versions.
- Rewritten prose: useful for catching a dropped sentence; noisy if the paragraph was reflowed. Consider comparing sentence by sentence.
- Code review: line diffs are the right tool, but the diff of a whole file is harder to read than a patch limited to the changed function. Use
git diff -U3and paste that. - Two unrelated documents: a diff will show almost everything as changed and tell you nothing. Skim first.
After comparing: share it
If the diff is the thing you need to send, copy the output and create a paste with the language set to Diff / Patch. The + and - prefixes get coloured, and the reader sees the change without running anything. Set an expiry for a one-off review, and mark the paste unlisted if it contains anything internal.
Frequently asked questions
Is my text uploaded when I compare it?
No. The comparison is JavaScript running in the page. Nothing leaves the browser unless you create a paste yourself.
Why is a whitespace-only change shown as different?
Line comparison is literal by default. Tick Ignore whitespace changes to treat lines that differ only in spacing as equal.
How large can the texts be?
There is no hard limit, but the algorithm is quadratic in the worst case. Up to a few thousand lines is comfortable; very large inputs will pause the tab.
Can I compare three versions?
Not at once. Compare A with B, then B with C. A three-way merge needs a real merge tool.