Skip to content
Utilgrove

Diff Checker — Compare Two Texts

Compare two blocks of text or code and see added and removed lines highlighted side by side. Private, in-browser, with optional whitespace ignoring.

How to compare two texts

  1. Paste the original into the left box and the changed version into the right.
  2. Optionally tick Ignore whitespace differences.
  3. Click Compare. Removed lines appear in red with a −, added lines in green with a +, and line numbers from both versions are shown in the margins.

Click Edit texts to go back and adjust.

Reading the output

Marker Meaning
(none) Line is in both texts
red Line is only in the original
+ green Line is only in the changed text

A modified line shows as a removal followed by an addition — the tool compares whole lines, which is the convention for code and documents and keeps the display simple.

Common uses

  • Reviewing edits — see exactly what a colleague changed in a document or contract.
  • Debugging config — compare a working and a broken configuration file to find the one line that differs.
  • Checking generated output — did the new version of a script produce the same result?
  • Comparing versions — two exports of the same data, two drafts of an email, two API responses.
  • Plagiarism and duplication checks — quick comparison of two passages.

Tips

  • Normalise first if you can: sort lists, format JSON with the JSON formatter, or strip timestamps, so the diff shows real differences rather than noise.
  • Whitespace mode is your friend for code copied from a web page or chat, where indentation often gets mangled.
  • Long lines are shown wrapped; the diff is still line-based, so a single changed word in a long paragraph marks the whole paragraph. Break text into shorter lines (one sentence per line) for finer results.
  • Ordering matters. Moving a block of lines shows as a removal in one place and an addition in another, not as a “move”.

Frequently asked questions

How does the comparison work?

It finds the longest sequence of lines common to both texts and marks everything else as removed (red, −) or added (green, +). This is the same approach used by Git and the Unix diff command.

Can I compare files?

Paste their contents. For binary or very large files (over a few thousand lines each), use a desktop diff tool — browser memory is the limit.

What does "ignore whitespace" do?

Lines that differ only in spaces, tabs or trailing whitespace are treated as identical. Useful for code that was re-indented or text with inconsistent spacing.

Is my text uploaded?

No. The comparison runs in your browser. Contracts, code and drafts stay on your device.

Last updated August 26, 2026.