Diff checker

Paste two versions of a text or a piece of code to see what changed: added and removed lines, and the exact words that differ inside edited lines.

  • 100% free
  • Runs in your browser
  • No uploads
View

Paste two versions to see what changed, line by line and word by word.

How to compare two texts

  1. Paste the original on the left and the changed version on the right, or drop a file onto each box.
  2. Read the result. Removed lines are red with a minus, added lines are green with a plus, and changed words inside a line are marked more strongly.
  3. Choose a view. Side by side shows both versions in two columns; Inline shows one column, old lines above new ones.
  4. Copy the diff as plain text with + and - at the start of each changed line, ready for an email or a ticket.

Example

Original:
The quick brown fox jumps over the lazy dog.
It was the best of times.
Call me Ishmael.

Changed:
The quick red fox jumped over the lazy dog.
It was the best of times.
Call me, Ishmael.
Happy families are all alike.

The diff reports 2 lines removed and 3 added. Line 1 is shown as edited, with brown and jumps marked against red and jumped; line 3 has only the comma marked; the last line is new. Line 2 is unchanged.

Options explained

  • Ignore whitespace: spaces and tabs don't count. Good for re-indented code or text pasted from a PDF.
  • Ignore case: Hello and HELLO count as the same. Good for SQL keywords or headings that changed case.
  • Hide unchanged lines: keeps three lines of context around each change and folds the rest.
  • Swap exchanges the two sides, so additions become removals. Use it if you pasted them the wrong way round.

Checking code an AI assistant changed

When you ask an assistant to fix one function, it often returns the whole file, sometimes with small unrequested edits: renamed variables, removed comments or changed defaults. Paste your version on the left and the reply on the right to see every change before you accept it. Tick Ignore whitespace if the assistant re-indented the code, so only real edits remain.

Frequently asked questions

How does the diff checker decide what changed?

It lines up the two texts line by line with the Myers algorithm, the same approach git uses, to find the smallest set of added and removed lines. Where a line was edited rather than replaced, the old and new versions sit next to each other and the words that differ are marked.

What does Ignore whitespace do?

Lines that differ only in spaces or tabs, including indentation, count as unchanged, like git diff -w. It's useful when code was re-indented or a formatter changed spacing. Line breaks still count, so a line split in two is still a change.

How large can the texts be?

Tens of thousands of lines. The comparison runs in a background worker so the page stays responsive, and the result is drawn in pieces. Long stretches of unchanged lines are folded so you can jump between changes; click a fold to open it.

Is my text uploaded or saved?

No. Both texts stay in your browser. That makes it safe for contracts, private code and configuration files with secrets.

Can I compare JSON with it?

You can, but reordered keys and reformatting will show as changes. The JSON diff checker compares the data itself and ignores key order and spacing.

Learn more