Diff Checker

Compare two texts, code or files side by side: changed words highlighted, moved lines found, spaces or case ignored, and a full change report to download.

Runs in your browser. Files never leave your device.
6 lines · 23 words · 134 characters
7 lines · 29 words · 167 characters
View
Highlight
Ignore
~3 changed+1 added−0 removed↕1 moved2 unchangedSimilarity 76.9%
2 changes
1Waterproof jacket1Waterproof jacket
2moved: Made from recycled polyestermoved from line 6
2changed: Sizes S to XL3changed: Sizes XS to XXL
3changed: Colours: black, navy4changed: Colours: black, navy, olive
4Machine washable at 30°C5Machine washable at 30°C
5changed: Free returns within 14 days6changed: Free returns within 30 days
6moved: Made from recycled polyester↑ moved to line 27added: Ships in 2 working days

Change report

5 differences: 3 changed lines, 1 added line and 1 moved line. The texts are 76.9% similar.

Lines and wordsOriginalModified
Lines67
Words2329
Unchanged lines22
Changed lines33
Removed lines0–
Added lines–1
Moved lines11
Words removed / added39

Every change (5)

The PDF, HTML and Markdown reports list every change (with up to 10 lines of each removed or added block) and the changed blocks with three lines either side. The .patch file is a standard unified diff that git apply and patch accept.

Step-by-step guideDiff Checker: How to Compare Two Texts or Files Online, Free

About the Diff Checker

Paste two versions of a text, or open two files, and see exactly what changed between them: which lines were edited and which words inside them, what was added, what was taken out and what was only moved. It works on drafts, contracts, code, config files, CSV exports, logs and anything else that is text.

Under the comparison is a change report. It gives the totals and a similarity score, then lists every change in plain words, such as "Line 2 (now line 3) changed: “S” → “XS”". You can download it as a PDF, HTML or Markdown report, or as a .patch file. Every feature is free, with no sign-up and no monthly limit. Both texts are compared on your own device and never uploaded.

How the comparison works

Both texts are split into lines. The checker then finds the smallest set of removed and added lines that turns the original into the new version. This is Myers' algorithm, the one git diff uses, and it means an inserted line shows as one added line while everything after it still lines up.

Inside each block of changes, a removed line and an added line that are mostly the same count as one edited line. The test is whether at least half of their character pairs match. When both lines are 40 characters or longer, runs of three characters are compared instead, so two unrelated sentences aren't shown as one edited line. Edited lines sit side by side with the changed words highlighted, or the changed characters if you pick Characters. A block of removed lines that turns up unchanged somewhere else is shown as moved, with the line it moved to, instead of as a removal and an addition.

The ignore settings change what counts as different. With Capital letters ticked, "Total" and "total" match. Ignore changes in spacing treats any run of spaces or tabs as one space and skips spaces at the start and end of a line. Ignore all spaces leaves spaces out completely. Blank lines skips changes that only add or remove empty lines (a line of only spaces counts as empty). Ignore text matching takes a regular expression, such as the Dates preset for timestamps in logs. Lines that match only because of these settings still show their own text, marked ≈, and the report counts them as unchanged.

similarity = (words kept in the original + words kept in the new version)
           ÷ (words in the original + words in the new version) × 100

kept = not removed or added; moved lines count as kept

Assumptions and limits

  • Text is compared, not formatting. A .docx file is read as its text (tracked deletions left out), and a PDF as its text layer, so bold, fonts, colours and images make no difference. A scanned PDF has no text layer; run it through OCR PDF first.
  • Lines are compared without their line-break characters. If one text uses Windows (CRLF) line breaks and the other Unix (LF), or only one ends with a line break, the report says so in a note. The .patch file keeps line endings exactly.
  • A line that was both moved and edited shows as removed in one place and added in the other, because a move is only recognised when the moved lines are identical.
  • A move needs at least 8 characters that aren't spaces, so a lone } or end that happens to appear elsewhere isn't called a move.
  • Character highlighting works on whole letters as you see them, so an Urdu or Hindi letter with its vowel marks, or an emoji, is never split.
  • Files up to 25 MB each can be opened. Big texts, and any comparison with an ignore pattern, are worked out in the background so the page stays usable. If two very large texts are also very different, the checker stops lining up the remaining blocks after a few seconds and shows them as replaced, and the report says it did. A comparison still running after 20 seconds, usually because of a very slow ignore pattern, is stopped with a message.

Worked examples

The sample: a product listing

The texts already in the boxes are two versions of a product description. One line moved to the top, three were edited and one was added. The report reads: 5 differences, 3 changed lines, 1 added line and 1 moved line, and the texts are 76.9% similar. The original has 23 words and the new version 29. 3 words were removed and 9 added, so (20 + 20) ÷ 52 = 76.9%.

1. Moved line 6 of the original to line 2 of the new version: 1 line moved up
2. Line 2 (now line 3) changed: “S” → “XS”; “XL” → “XXL”
3. Line 3 (now line 4) changed: added “, olive”
4. Line 5 (now line 6) changed: “14” → “30”
5. Added line 7 of the new version

Two nightly backup logs, timestamps ignored

Each log has three lines that start with a date and time. Compared exactly, all three lines differ. With the Dates preset in Ignore text matching, the timestamps don't count, and only the real change is left: one changed line, the number of files copied.

[2026-11-29 10:31:40] 1,204 files copied
[2026-11-30 10:31:52] 1,198 files copied

Exactly:          3 differences: 3 changed lines
Dates ignored:    1 difference: Line 2 changed: “1,204” → “1,198”

A config value, as a patch

Changing one port in a three-line app.env file and downloading the .patch gives a standard unified diff. git apply or patch -p1 makes the same change to another copy of the file.

--- a/app.env
+++ b/app.env
@@ -1,3 +1,3 @@
 host=localhost
-port=8080
+port=9090
 debug=true

Reading the comparison

MarkColourMeaning
−RedA line only in the original: removed
+GreenA line only in the new version: added
− and + side by side, words highlightedRed and greenA line edited in place; the highlighted words (or characters) are the ones that changed
↕BlueA line that moved, with the line number it moved to or from
≈GreyLines that are the same once your ignore settings apply, counted as unchanged
Show N unchanged linesGrey barUnchanged lines folded away; click to open them

How to use the Diff Checker

  1. Add the two versions. Paste the original on the left and the new version on the right, or press Open file on each side, or drop a file onto it. Text, code, .docx and .pdf files all work.
  2. Choose how to compare. Pick side-by-side or unified view and word or character highlighting. Tick what to ignore: capital letters, spacing, blank lines or text matching a pattern.
  3. Go through the changes. Use the up and down buttons to step through each block of changes, or click any change in the report to jump to it. Turn on Merge to keep the original or take the new version for each block, then copy or download the merged text.
  4. Save the report. Download the change report as a PDF, HTML or Markdown file, download a .patch file, copy the report as text, or make a share link that carries both texts.

Frequently asked questions

How do I compare two texts and see the differences?

Paste the original into the left box and the new version into the right, or open a file on each side. The comparison updates as you type. Removed lines are red, added lines green, edited lines sit side by side with the changed words highlighted, and moved lines are blue. The change report under it lists every change with its line numbers.

Does it show which word changed inside a line?

Yes. When a removed and an added line in the same block are mostly the same, they are shown as one edited line and only the words that differ are highlighted. Switch Highlight to Characters to see single-letter changes, such as colour becoming color.

Can it ignore spaces, capital letters and blank lines?

Yes, each one has its own setting. Ignore changes in spacing treats runs of spaces and tabs as one space and skips spaces at the ends of a line. Ignore all spaces drops spaces completely. Capital letters makes the comparison case-insensitive. Blank lines skips changes that only add or remove empty lines (a line of only spaces counts as empty). You can also ignore any text that matches a regular expression, for example timestamps, numbers or IDs.

What is in the change report?

A one-line verdict, line and word totals for each version, the similarity score, notes on things like different line endings, and every change in plain language: which lines changed and how, which were removed or added, and which moved where. Download it as PDF, HTML or Markdown, or copy it as text.

How is the similarity percentage worked out?

By words. It is the words left alone in both versions as a share of all the words in both: (words kept in the original + words kept in the new version) ÷ (words in both) × 100. Moved lines count as kept. It never shows 100% when something changed or 0% when something is shared.

Can I compare Word documents or PDFs?

Yes, by their text. Open a .docx and its paragraphs and table cells are read in order, with tracked deletions left out. Open a PDF and its text layer is read page by page. Formatting isn't compared. A scanned PDF has no text to read, so run it through OCR PDF first. For a word-by-word view of two PDFs there is also the Compare PDF tool.

What is the .patch file for?

It is a standard unified diff, the same format git diff and diff -u write. It names the file you opened on the left (or on the right if only that side is a file), or file.txt for pasted text, so running git apply or patch -p1 with it next to that file turns the original into the new version. It is made from an exact comparison, so ignore settings never leave anything out of it.

Is my text uploaded or saved anywhere?

No. Both texts are compared in your browser and never sent to our server, and nothing is stored after you close the page. A share link holds both texts inside the link itself, after the # sign, a part browsers don't send to servers. Anyone you give the link to can read the texts, so don't share links to private material.

This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.