Back to all tools

Code Compare

See exactly what changed between two versions of code or text

Differences

Removed lines are red and added lines green; the exact words that changed inside a line are highlighted and underlined. Long unchanged stretches are folded — click them to expand. Everything stays in your browser.

How Code Compare works

Paste

Paste or drop the original and the changed version, from any language or plain text.

Compare

See every change side by side or unified, with the changed words highlighted.

Share

Jump between changes and copy or download the result as a .diff patch.

Frequently Asked Questions

Is my code uploaded to a server?

No. The comparison runs entirely in your browser, so private code, config files and keys never leave your device.

What do the colours mean?

Red lines were removed and green lines were added. Inside a changed line, the exact words that differ are highlighted in a stronger colour and underlined, so small edits like a renamed variable are easy to spot.

What do Ignore whitespace and Ignore case do?

Ignore whitespace treats lines as equal when they only differ in indentation, trailing spaces or the amount of spacing between words. A space added inside a word, such as @Customer InvoiceNumber, still counts as a change. Ignore case treats upper and lower case letters as equal. Both are useful when a formatter or editor changed the layout but not the logic.

What is a .diff patch?

It is the standard text format for changes used by Git and code review tools. You can share it, or apply it to the original file with tools like git apply or patch.