Skip to content
DevTools

Text Diff

text × text → diff

Compare two versions line by line and see what was added and removed.

original
changed

About Text Diff

Paste two versions of anything — a config file, an API response, a log excerpt — and see line by line what was added and what was removed. Side by side puts each removal opposite the line that replaced it; unified stacks them into a single column with the familiar plus and minus markers.

Two options do most of the work in practice. Ignoring whitespace stops trailing spaces and changed indentation from swamping the real differences. Formatting both sides as JSON pretty-prints them first, which turns an unreadable diff of two minified payloads into something you can actually scan — pair it with the JSON formatter's sort-keys mode when the two sides also disagree about key order.

The comparison uses a longest-common-subsequence match computed in your browser. Nothing is uploaded, so comparing two real production responses is safe.

Common questions

Does it compare word by word inside a line?
Not currently — the granularity is a whole line, which is how git and most code review tools present changes. A line with one character altered shows as one removal and one addition sitting opposite each other.
How do I usefully diff two JSON payloads?
Use the format-both-as-JSON button first. Minified JSON is a single enormous line, so a line diff can only tell you it changed. Pretty-printing gives the comparison something to align on, and sorting keys beforehand removes differences that are only about ordering.
Is there a size limit?
Alignment is exact up to a few thousand changed lines; beyond that the changed region is reported as a wholesale replacement rather than stalling the tab. Identical opening and closing sections are matched instantly however long they are, so large files with small edits stay fast.
Is my text uploaded to compare it?
No. The diff is computed in JavaScript on your machine, and the page has no server to send anything to.

This page does the work itself, in this tab. Nothing you paste is sent to a server. Close the tab and no copy remains.