Compare Text and Code Online

Paste two versions and see exactly what changed — line by line, with the changed characters highlighted inside each line. The comparison runs inside your browser: no upload, no account.

Paste into both sides and the differences show up. The comparison runs in your browser.

The same tool is a free Chrome extension, one click from the toolbar: add it to Chrome.

What it compares

Plain text, source code, configuration files, JSON and CSV. Paste the text directly or, once the editor is open, load a file with Select file above either side: any plain-text file, plus Word (.docx) and Excel (.xlsx), whose text is extracted right in the browser. Common languages such as JavaScript, Python, Java, HTML and CSS are detected and highlighted.

How the comparison works

Lines are matched with one of three algorithms — Smart Diff, Ignore Whitespace or Classic (LCS), under Options — and the changed characters are highlighted inside each modified line. One line above the panes sums up the result: how many lines changed, were added or removed. When two texts differ only in line endings, in spaces at the ends of lines or in letter case, it says that too. Unchanged blocks can be collapsed so long files stay readable, and the split view keeps both versions aligned as you scroll. The comparison happens in your browser; the texts leave it only if you turn on the optional AI summary, which sends them to OpenAI with your own API key.

Prefer it without the tab?

The same tool exists as a Chrome extension. It opens in one click from the toolbar, works offline, and adds something this page cannot do: comparing the source of two open browser tabs.

Get the Chrome extension — free