Compare Codes

Paste up to 50,000 lines on each side to see what changed, line by line and word by word. It runs in your browser, so nothing is uploaded.

Unchanged0
Modified0
Added0
Deleted0
Total rows0

Result

No comparison has been run yet.

Paste code on both sides, then click Compare.
Left: 0 lines, 0 charactersRight: 0 lines, 0 characters

How to use it

  1. Paste the original on the left and the new version on the right, or load two files.
  2. Click Compare, or press Ctrl+Enter in either box.
  3. Step through each block of changes with Previous and Next, or pick one from the list.
  4. Not sure what to expect? Click Sample to load an example.

Options

Ignore whitespace
Collapses runs of spaces and tabs and trims each line. Spaces between symbols still count, so a=b and a = b differ.
Ignore case
Treats upper and lower case letters as equal.
Ignore blank lines
Leaves empty lines out. Line numbers still match your input.
Changed only
Hides unchanged rows.

Line endings are always normalized, so a file converted from CRLF to LF shows no changes.

Reading the result

  • Rows are matched with the patience diff method, so a moved function is less likely to be paired with the wrong lines. How the matching works
  • A modified row pairs a removed line with an added line at the same position. If almost every word is highlighted, read it as one deleted line and one new line.
  • Large files, up to 50,000 lines on each side, can take a few seconds to display. Turn on Changed only to make them faster.
  • A diff shows what changed, not whether the change is right. How to review a change