Trusted Choice Guide
Tools / Diff

Diff Checker: compare text & code online

Paste the original on the left and the changed version on the right. Differences appear instantly – line by line and word by word. Everything runs in your browser; your text never leaves your device.

Original
Changed

🔒 Private by design: the comparison runs locally in your browser. No upload, no account, no tracking of your text.

How to compare two texts

  1. Paste or drop the original version into the left field – or click “Open file”.
  2. Paste the new version into the right field. The result updates automatically (or press Ctrl + Enter).
  3. Red lines were removed, green lines were added. Inside changed lines, the exact words or characters are highlighted.
  4. Jump between changes with ↑ ↓, fold away unchanged parts, and copy or download the result as a standard .diff patch.

Features

  • Accurate line diff (Myers algorithm – the same idea Git uses)
  • Word- and character-level highlighting inside changed lines
  • Side-by-side and unified view; unchanged blocks fold automatically
  • Ignore whitespace and letter case
  • Open files or drag & drop (up to 5 MB) – code, JSON, CSV, config files, plain text
  • Export as a unified patch (.diff) for git apply or patch
  • Works offline once loaded, on desktop and mobile

Last checked: October 2026. Found a mistake? Use the form below – we fix confirmed errors and update the date.

Frequently asked questions

Is my text or code uploaded anywhere?

No. The comparison runs entirely in your browser with JavaScript. Nothing you paste is sent to our server or stored – close the tab and it is gone.

Which file types can I compare?

Any plain-text file: source code (JavaScript, Python, PHP, Java, C#, HTML, CSS, SQL …), JSON, XML, YAML, CSV, Markdown, logs and ordinary text, up to 5 MB per side. Word or PDF files must be copied as text first.

What does “Ignore whitespace” do?

It treats lines as equal when they differ only in spaces, tabs or indentation – useful after reformatting code.

How do I read the result?

On the left you see the original, on the right the new version. Red = removed, green = added. In a changed line, the highlighted words show exactly what was edited.

Can I create a patch file?

Yes. “Copy patch” and “Download .diff” produce a standard unified diff with 3 lines of context, the same format git diff uses.

Is the diff checker free?

Yes – completely free, no sign-up and no limits apart from the 5 MB file size.

💬 Suggestion, bug or complaint?

Help us improve this page. We read every message.

We only use your details to handle your request (see privacy policy).

More free tools

📬 Free: the Mini Security Checklist 2026

Our 7-page PDF (VPN, password manager, antivirus, cloud) – instant download, free, no sign-up, no email.