Diff checker

Compare two texts and see exactly what changed.

View
Granularity

How to compare two texts

  1. Paste both versions

    Put the older text in Original and the newer one in Changed. Press Open or drop a file onto either pane to load it, and use Swap to flip the two sides.

  2. Tune the comparison

    Choose Lines for code and documents, Words or Characters for short passages. Tick Ignore whitespace to skip indentation and spacing changes, Ignore case to treat A and a as the same, and Only changes to hide unchanged lines.

  3. Read the result

    Red marks removed text and green marks added text. In Lines view the changed words inside a line are highlighted, and the status line counts additions, removals and unchanged lines.

Good to know

  • Side by side shows Original and Changed in two columns with line numbers. Unified shows one column with - and + prefixes, the same layout as git diff.
  • Ctrl+C (Cmd+C on Mac) with nothing selected copies the diff as unified text: unchanged lines start with a space, removed lines with - and added lines with +.
  • Words and Characters mode show the two texts merged into one passage with deletions struck through and insertions marked, which suits prose and short strings.
  • Ignore whitespace collapses runs of spaces and tabs and trims line ends, so reformatting does not show up as a change.
  • The diff runs in a background worker and copes with hundreds of thousands of lines. The view is capped at 5,000 rows; tick Only changes to see just the differences in a large file.
  • Everything runs in your browser. Nothing is uploaded.

Questions people ask

Which granularity should I use?

Lines is right for code, configuration and most documents, and it still highlights the changed words inside a line. Words suits paragraphs of prose. Characters is best for short strings such as URLs or keys where a single character matters.

Why does it say very different inputs, coarse diff?

When two texts share almost nothing, the exact algorithm would take too long, so the tool falls back to matching the common start and end and marking everything between as changed. Comparing smaller sections gives a finer result.

Can I compare two files?

Yes. Press Open on each pane, or drop a file onto it, and the file's text is loaded. Any text file works: source code, JSON, CSV, logs.

Can I save or share the diff?

Press Ctrl+C with nothing selected to copy the whole diff in unified format, then paste it into a ticket, a review comment or a file. There is no share link; nothing is stored on a server.

Is my text uploaded?

No. The comparison runs in a web worker in your browser and both texts stay on your device.