Code Diff Checker

Paste the original and the changed version to see which lines were added, removed or edited. Switch between side-by-side and unified views and export the changes as a .diff file.

View

ORIGINAL

0 characters0 lines

CHANGED

0 characters0 lines

RESULT

The differences appear here once you paste both versions.

Runs entirely in your browser. Nothing you enter is sent to a server.

How to compare two versions of code

  1. Paste both versions

    Put the original on the left and the changed version on the right, or open two files.

  2. Read the differences

    Removed lines are red, added lines green, and the changed part of an edited line is marked. Long unchanged stretches are folded.

  3. Export the changes

    Copy or download the differences as a unified diff to share them or attach them to a ticket.

Line by line, like git

The comparison uses the Myers algorithm, the same approach as diff and git, so it finds the smallest set of added and removed lines. Inside edited lines the changed words and symbols are highlighted too.

Ignoring whitespace

Re-indented code or spaces added at line ends can hide the real changes. With Ignore whitespace, lines that differ only in spaces and tabs count as unchanged, like diff -w.

Frequently asked questions

What format is the .diff file?

It's the standard unified diff format with three lines of context around each change, the same format diff -u and git diff produce.

Is there a size limit?

No fixed limit. Files with thousands of lines compare in a moment. Very long results show the first 4,000 rows; the exported diff always covers everything.

Is my code uploaded?

No. Both versions are compared in your browser and never leave your device.