Diff checker

Paste an original and a changed version and the diff checker highlights every added, removed and edited line, with the exact changed words marked inside each line.

Processed on this device. Nothing is uploaded.
Loading Text Diff / Compare…

How to compare two texts for differences

  1. Paste the original text in the left box and the changed version in the right box.
  2. Choose Lines or Words mode, and Side by side or Inline view.
  3. Tick Ignore case, Ignore whitespace or Changes only to filter out noise.
  4. Read the summary of lines added and removed, then scroll the highlighted comparison. Use Swap to reverse the direction.

What you can do with Text Diff / Compare

Line and word modes
Compare line by line like a code review, or switch to word mode to see edits in flowing prose such as contracts and essays.
Word-level highlights
Inside each changed line, the exact words that were deleted or inserted are marked, so a one-word edit in a long paragraph is easy to spot.
Side by side or inline
View both versions in parallel columns with line numbers, or as a single unified list similar to git diff output.
Ignore case and whitespace
Skip differences that don't matter, like changed capitalization, extra spaces or code that was only reindented.
Changes only view
Hide unchanged lines and keep two lines of context around each change, which makes long documents much faster to review.
Private comparison
Both texts are compared locally in your browser, so you can diff contracts, source code or drafts without uploading them anywhere.

How a diff checker finds changes

A diff checker works out the smallest set of insertions and deletions that turns one text into the other. This tool uses the Myers algorithm, the same approach behind git diff and GNU diff, first on whole lines and then on the words inside changed lines. Removed content is shown in red and added content in green. A modified line is really a removal plus an insertion, which is why it appears on both sides with the changed words emphasized.

Common uses include checking what a colleague changed in a document, comparing two versions of a configuration file, reviewing contract revisions when track changes wasn't turned on, and confirming that copied text matches the source exactly. For code, Ignore whitespace is handy after reformatting, since indentation changes otherwise mark every line as different. Very large or completely different inputs are simplified: if the texts differ in more than about 4,000 places they are shown as a full replacement, and the output is capped at 6,000 rows.

Frequently asked questions

Are the texts I compare uploaded to a server?

No. The comparison runs in JavaScript inside your browser tab, so neither version is sent anywhere or saved. You can safely compare confidential documents, legal drafts or private source code. Refreshing the page clears both boxes.

Can I compare two Word or PDF documents?

The diff checker works with plain text. Copy the text out of each Word document and paste it into the two boxes. For PDFs, the PDF to Text tool can extract the text first. Formatting such as bold or fonts isn't compared, only the words.

What does Ignore whitespace do?

It treats runs of spaces and tabs as a single space and ignores leading and trailing spaces when matching lines. Lines that differ only in indentation or spacing are then shown as unchanged, which is useful after reformatting code or cleaning up pasted text.

Is there a size limit?

There is no fixed limit, but very large inputs take longer because everything runs on your device. Texts with thousands of lines usually work fine. If two texts differ in more than about 4,000 places, they are shown as a full replacement, and output stops at 6,000 rows.

Does the diff checker work on mobile?

Yes, it works in mobile browsers on iPhone and Android. On small screens the side-by-side table scrolls horizontally, so the Inline view is usually easier to read on a phone. Changes only also helps by hiding long unchanged sections.