cv.cm
All lessons

Text

How to compare two texts and see the differences

You have two versions of a document, a config or a contract clause and need to see what changed. You will paste both and read the added and removed lines, with a count of each. Nothing leaves this tab.

6-minute read

Today's result A line-by-line diff: removed lines marked −, added lines marked +, unchanged lines plain, with +/− counts and a unified diff you can copy.

Open the diff checker with both versions at hand. Put the older text on the left so added lines read as new. Nothing is uploaded.

Open Diff checker
Contents
  1. Decide which is the original

    The left box is the original and the right box is the changed version. Lines only on the right show as added (+), lines only on the left as removed (−). Swapping them flips the colors.

    Original on the left, changed text on the right: − lines are removed, + lines are added.
    Original on the left, changed text on the right: − lines are removed, + lines are added.
  2. Open Diff checker on cv.cm

    Two empty boxes and the result area are ready. Nothing is uploaded.

    Open Diff checker
  3. Paste both texts

    Paste the original on the left and the new version on the right. The diff appears as you paste; the line above it counts added, removed and unchanged lines.

  4. Ignore whitespace when it is noise

    Tick Ignore extra spaces when an editor re-indented the text or changed tabs to spaces; only real content changes then show.

    Ignore extra spaces hides re-indenting and tab changes so only content changes show.
    Ignore extra spaces hides re-indenting and tab changes so only content changes show.
  5. Read the result

    Each changed line is shown once as − (old) and once as + (new). A line that moved shows as removed in one place and added in another; a diff does not track moves.

  6. Copy a unified diff

    Copy unified diff puts the standard patch format on the clipboard, with --- and +++ headers and @@ hunks, ready for a ticket, a code review or `patch`.

FAQ

Can I compare two texts free online?

Yes. cv.cm diffs them in this tab. Nothing is uploaded.

Which side is the original?

The left. Lines only on the right are added (+), lines only on the left are removed (−).

Can it ignore spaces?

Yes. Tick Ignore extra spaces to skip whitespace-only changes.

What is a unified diff?

The standard patch format with --- and +++ headers and @@ hunks, used by git and code reviews. Copy unified diff produces it.

Does it compare words inside a line?

No. It works line by line; a changed line shows as one removed and one added.