← All tools

Diff checker

Compare two blocks of text line by line.

How to use the diff checker

  1. Paste the older version into Original on the left and the newer version into Changed on the right.
  2. Click Compare — the diff runs on demand rather than live, so you can finish pasting both sides first.
  3. Read the combined result underneath: removed lines are red with a - prefix, added lines are green with a +, and unchanged lines stay muted so you keep the surrounding context.
  4. Check the summary for the totals, e.g. 4 added · 2 removed.
  5. Remember the comparison is per line: a line you edited shows up as its old version removed plus its new version added.

Common uses

  • Review config changes — an nginx.conf, .env or YAML file — before deploying, so a one-character edit can't sneak past you.
  • Compare two versions of a contract, essay or email to see exactly what a collaborator changed when tracked changes aren't available.
  • Check code snippets outside version control: your local function against the one in a teammate's message or an answer found online.
  • Verify a bulk find-and-replace did only what you intended by diffing the file before and after.
  • Spot added or removed rows between two CSV exports of the same report.

Tips & limitations

  • Matching is exact: a trailing space, a tab instead of spaces, or an upper/lowercase difference makes two otherwise identical lines count as changed. There's no ignore-whitespace or ignore-case option.
  • The diff is line-level only — it won't highlight which word changed within a line. For prose, putting one sentence per line before comparing gives far more readable results.
  • Moved text isn't detected as a move: a relocated block shows as removed in one place and added in the other.
  • Normalize structured text first — run both versions through the JSON formatter or SQL formatter so the diff shows real changes rather than formatting noise.
  • Work and memory grow with the product of the two line counts. A few thousand lines per side is comfortable; files with tens of thousands of lines can stall the browser tab.

How it's built & why it's safe

The comparison is a classic longest-common-subsequence (LCS) diff — the same family of algorithm behind git diff and the Unix diff command — computed with dynamic programming in plain JavaScript. It finds the longest run of lines the two texts share, then marks everything else as added or removed. Both texts stay in your browser: nothing is uploaded, stored or logged, which makes it safe for unpublished contracts and configs that contain secrets.

Related tools: JSON Formatter · SQL Formatter · Word Counter

Further reading: Why Toolkit runs entirely in your browser (and why that matters)

Frequently asked questions

How does the comparison work?

It computes the longest common subsequence of lines — the largest set of lines appearing in both texts in the same order — and marks every other line as added or removed. That's the same principle git and the Unix diff tool use.

I changed one word — why is the whole line marked removed and added?

The diff works at line granularity, so any edited line counts as the old line removed plus the new line added. There's no in-line character highlighting; for prose, compare with one sentence per line to narrow things down.

Does it ignore whitespace or capitalization?

No — lines must match exactly, so invisible differences like trailing spaces or tabs versus spaces register as changes. If a diff looks noisier than expected, whitespace is the usual culprit.

Is there a size limit?

There's no hard cap, but the algorithm compares every line of one text against every line of the other, so cost grows quickly with size. A few thousand lines per side is fine; far larger inputs can make the tab unresponsive.

Does it detect moved lines?

No. A block that moved shows up as a removal at its old location and an addition at the new one — the algorithm only tracks lines that stay in the same relative order.

Is my text private?

Yes. Both texts are compared entirely in your browser and never leave your machine, so it's safe to diff confidential documents, code or configuration files.

Can I diff Word documents or PDFs?

Not directly — the tool compares plain text. Copy the text out of the document (or export it as .txt) and paste both versions in; formatting like bold or fonts isn't compared.