Skip to content
DeveloperTools

Text Compare

Private

Original

Changed

About this tool

Paste the old version on the left and the new one on the right. The comparison runs as you type and the result is drawn straight onto the two editors: lines only in the original are tinted red, lines only in the new version green, and lines that were edited amber with the exact words that changed picked out inside them. There is no third pane to read the answer in — the answer is on the text you pasted.

Both panes stay fully editable the whole time. Fix a typo on either side and the comparison redraws around it, so the tool doubles as the place you reconcile two versions rather than only inspect them. Scrolling one pane moves the other to the matching line, not to the same pixel, so a line and the line it became stay opposite each other even after a block of insertions has pushed one side down.

The line matching uses Myers’ diff, with unique lines used as anchors on large inputs, so a moved block is reported as a move rather than turning everything below it red. Whitespace, letter case and blank lines can each be excluded from the comparison, which is what you want when the only real difference is that a file was reindented. Arrows in the toolbar step through the changes one at a time and the line numbers of changed rows are coloured, so nothing is missed on a long document.

Nothing you paste is transmitted. The page is static HTML and the comparison happens in your tab, which makes it safe for contracts, logs, configuration and anything else you would not paste into a server you do not control.

Frequently asked questions

Is my text uploaded to a server?

No. The comparison is plain JavaScript running in your browser. There is no backend endpoint, so neither text ever leaves your device — you can disconnect from the network and it still works.

Can I edit both sides?

Yes. Both panes are ordinary text editors, not read-only previews. Type, paste, drop a file onto either side or upload one, and the comparison redraws around the change. You can also swap the two sides, and copy either one back out.

Why do the two panes scroll together?

Because they are aligned by content rather than by pixel. The tool knows which line on the left corresponds to which line on the right and scrolls the other pane to that line, so matching text stays level even where one side has extra lines. Turn "Sync scroll" off in the toolbar if you want to look at two distant places at once.

What do the ignore options do?

"Ignore whitespace" collapses runs of spaces and tabs and ignores indentation, so a reformatted file compares equal. "Ignore case" makes letter case irrelevant. "Ignore blank lines" drops empty lines from the comparison while keeping the real line numbers of everything else, which is useful after text has been re-spaced.

How large a text can I compare?

The limit is your browser memory rather than an upload cap. Documents of a few thousand lines compare in well under a second; past roughly 400 KB per side the colouring switches off to keep typing smooth, and both texts stay fully editable.

Does it compare JSON structurally?

No — this tool compares text line by line, so two JSON documents with the same data but different key order show as different. Use the JSON Compare for that: it matches objects key by key, ignores key order and formatting, and accepts JavaScript object literals as well as JSON.

Arrow keys to navigate, Enter to open, Esc to close