baoobaoo

Text Diff

Paste the original text on the left and the changed version on the right to see exactly what was added, removed or edited. Compare line by line or word by word, ignore case or extra spaces, and copy a summary of the changes. Nothing is uploaded — the comparison runs in your browser.

Compare text

Document Review & Change Log Kit

Version change log workbook, document review checklist, redline review sheet and a contract comparison checklist in Excel, Word and PDF.

Formats: XLSX, PDF, DOCX. Instant download after payment (link valid 72 hours, up to 5 downloads). AI-assisted: the templates were drafted with AI help and reviewed and laid out by Kedop.

$4.00 USD, one-time

Secure card checkout by Stripe. Full refund within 7 days — see the refund policy and license.

How to compare two texts

  1. Paste the original version in the left box and the new version in the right box.
  2. Choose line-by-line for documents and code, word-by-word for edited prose, or character mode for short strings such as IDs.
  3. Tick “Ignore case” or “Ignore extra spaces” if those differences do not matter.
  4. Read the result: removed text is red and struck through, added text is green.
  5. Copy the change list to paste into an email, ticket or review note.

A changed line appears as a removed line followed by an added line. Switch to word mode to see exactly which words changed inside it.

How a diff works

Diff tools look for the longest common subsequence (LCS) — the largest set of lines or words that appear in both texts in the same order. Everything in the original that is not part of that common sequence was removed; everything in the new text that is not part of it was added. This is the same idea behind the Unix diff command and the change views in version control systems such as Git, although those use faster algorithms (such as Myers’ algorithm) and extra heuristics to produce readable results for very large files.

Line, word or character mode?

ModeBest forExample
LineCode, configuration files, lists, CSV rowsA changed setting in a config file
WordArticles, contracts, emails, essays“jumps” changed to “leaps”
CharacterShort strings: IDs, URLs, passwords you are checking visuallyA single wrong digit in an order number

Line mode is fastest and clearest for long texts. Word mode shows edits inside sentences. Character mode is precise but noisy on long passages.

Common uses

Worked example

In the sample above, line mode shows four changes: “jumps” became “leaps” in line one, “Tuesday” became “Wednesday” in line two, “and slides” was added to line three, and a new line “Coffee will be provided.” was inserted. Each changed line appears as a red removed line and a green added line. Switching to word mode highlights only “jumps”/“leaps”, “Tuesday”/“Wednesday” and “and slides”, while the new line stays green as a whole.

Ignoring whitespace and case

Extra spaces, tabs and trailing spaces often creep in when text is copied between programs. “Ignore extra spaces” treats any run of whitespace as a single space and ignores spaces at the ends of lines, so only real content changes are highlighted. “Ignore case” treats “Report” and “report” as the same. Turn both off when exact formatting matters, such as in code where indentation is significant.

Privacy

The comparison runs entirely in your browser with JavaScript. The text you paste is not uploaded, stored or logged, so you can compare drafts and internal documents. Close the tab to clear it.

Limits

The comparison uses a dynamic programming table whose size is the product of the two texts’ lengths, so very long texts in word or character mode may be too large; use line mode for long documents. For comparing whole files or folders regularly, dedicated tools and version control systems are more suitable. Formatting such as bold, fonts and tracked changes in Word documents is not compared — paste plain text.

Reading the colours

Green text with a light green background is present only in the changed version: it was added. Red struck-through text with a light pink background is present only in the original: it was removed. Unhighlighted text is the same in both. When a word is replaced, you will see the old word in red immediately followed by the new word in green. In line mode, a single edited line produces one red line and one green line; scan them together to find the edit, or switch to word mode.

Comparing code and structured data

For source code, use line mode with “Ignore extra spaces” turned off, because indentation can change meaning in languages such as Python and YAML. For JSON, sort keys and format both documents the same way before comparing, otherwise a simple reordering shows as many changes. For CSV exports, sort both files by the same column first so that matching rows line up; then line mode shows which rows were added or removed.

Tips for reviewing changes

Frequently asked questions

How do I compare two texts for differences?

Paste them into the two boxes; additions are highlighted in green and deletions in red.

Is my text uploaded?

No. The comparison runs in your browser and nothing is sent to a server.

Can I compare Word documents?

Copy the text from each document and paste it in. Formatting differences are not compared.

What algorithm does the tool use?

A longest common subsequence comparison on lines, words or characters.

Why does a changed line show as removed and added?

In line mode any change makes the whole line different; use word mode to see the exact words.

Is there a size limit?

Very long texts in word or character mode may exceed the browser limit; line mode handles longer documents.

Can I compare more than two versions?

Compare them in pairs — version 1 with 2, then 2 with 3 — and record each set of changes in a change log.