Tools

Compare Two Texts and See Every Difference

Paste the original on the left and the new version on the right. Changes show up as you type: additions in green, deletions in red, plus a similarity score.


Extra filters:
Words: 0 Characters: 0
Words: 0 Characters: 0
Added
0
Removed
0
Changed Lines
0
Modification Percentage
0%
Similarity
100%
Guide

Need to compare text quickly? Paste two versions side by side and the diff checker marks every word, line or character that changed. It's free, there's nothing to install, and the comparison runs in your browser, so your text never reaches a server.

A Diff Checker for Text, Code and Documents

Pick the level of detail you need: word by word for edited prose, line by line for code and lists, or character by character to catch a single typo. Added text is green, removed text is red, and the statistics panel counts what was added and removed and how similar the two texts are.

Read the texts side by side in the split view, or switch to the unified view to see one merged version. Filters let you ignore case, extra spaces, punctuation and empty lines, so formatting noise doesn't hide the real edits. convert between data formats instantly.

Compare Documents, Contracts and Web Copy

Compare two drafts of an article, check what the other side changed in a contract, review a config file, or confirm a page kept its headings after a site migration. You can export the result as HTML or TXT, copy it, or show only the parts that changed. reverse and mirror text strings online.

Comparing Word files or PDFs? Copy the text out of each document and paste it in. The tool compares the words themselves, so changes to fonts, colors or layout won't show up.

Frequently Asked Questions

Paste the original text in the left box and the new version in the right box. Differences are highlighted as you type: added words in green, deleted words in red. Switch to line or character mode for code or typos.

Yes. It's free, needs no account, and runs entirely in your browser. Neither text is uploaded, stored or logged.

Yes. Copy the text from each document and paste it into the two boxes. The tool compares the text itself, not the formatting, so changes to fonts, colors or layout won't be flagged.

Yes. You can ignore uppercase and lowercase, extra spaces, punctuation and empty lines, so only real edits are highlighted.

Yes. Export it as a .txt file, or as an .html file that keeps the green and red highlighting, which is handy for sharing a review or keeping a record.

Word by word works best for prose, because it shows exactly which words changed inside a sentence. Line by line is better for code, lists and CSV files. Character by character catches single-letter typos.

How to Compare Two Texts

  1. Paste your original text
    Click inside the Original Text panel and paste the first version of your document. You can also type directly or use the Paste button to pull from your clipboard.
  2. Paste the modified text
    Paste the second version — the revised, edited, or received copy — into the Modified Text panel on the right.
  3. Choose your comparison mode
    Select Word by Word for fine-grained inline changes, Line by Line for structured documents and code, or Character by Character for the most granular diff possible.
  4. Review the highlighted differences
    Additions appear in green and deletions in red. The statistics panel shows counts of added and removed words, changed lines, modification percentage, and overall similarity score.
  5. Export the result
    Use the Export TXT or Export HTML buttons to save the annotated diff. The HTML export preserves colour highlighting for sharing or archiving.

Example: Tracking an Editorial Change

Take these two short sentences as a before/after comparison:

"The company reported strong quarterly results." → "The company announced exceptional quarterly earnings."

The word-by-word diff would mark "reported" as deleted, "announced" as added, "strong" as deleted, and "exceptional" as added — and "results" as deleted and "earnings" as added. Three word pairs changed, zero words lost, similarity approximately 57%. The line-by-line mode would flag the entire line as changed. Both views show exactly what shifted and how much.

Common Use Cases

Code review and version control

Developers use diff tools daily to review pull requests, check patch files, and understand what changed between two branches. This tool gives a quick visual diff without needing a terminal or IDE.

Legal and contract review

Lawyers and paralegals compare contract drafts to ensure no clause was added, removed, or silently altered between versions. The export function creates an audit trail that can be attached to correspondence.

Editorial and content review

Editors comparing a first draft with a revised submission can see at a glance which sentences were restructured, which paragraphs were cut, and which new content was added — without reading both versions in full.

SEO content auditing

SEO professionals track on-page content changes between crawls or site migrations. Comparing old and new page copy confirms whether headings, meta descriptions, or key passages were preserved or altered.

Translation QA

Translators and localization managers compare source strings across versions to identify which segments changed and need retranslation, rather than reviewing every string from scratch.

How the Diff Checker Works

All comparison runs entirely in your browser using a JavaScript implementation of the Longest Common Subsequence (LCS) algorithm — the same mathematical foundation used by the Unix diff utility.

LCS Algorithm
LCS finds the longest sequence of tokens (words, lines, or characters) that appear in both texts in the same order. Everything not in that sequence is marked as added or removed.
Comparison modes
Word mode tokenizes at whitespace boundaries. Line mode splits at newlines — ideal for code, CSV, or structured prose. Character mode is the most granular and is useful for catching single-character typos or encoding changes.
Statistics
The tool counts added tokens, removed tokens, changed lines, modification percentage (changed tokens ÷ total tokens), and similarity score (shared tokens ÷ total tokens). Both metrics together give a full picture of how much the text evolved.
Smart filters
The Ignore Case, Ignore Spaces, Ignore Punctuation, and Ignore Empty Lines options pre-process both texts before comparison. This removes noise so that only meaningful semantic changes surface in the diff.

Who This Tool Is For

Anyone who works with two versions of the same text benefits from a fast, private diff tool.

  • Developers who need a quick visual diff outside their IDE — for comparing API responses, config files, or documentation drafts.
  • Writers and editors reviewing revisions, tracking changes in collaborative documents, or verifying that a copy editor's changes match the agreed brief.
  • Legal professionals comparing contract versions, terms of service drafts, or regulatory submissions to catch unauthorized changes.
  • SEO and content managers auditing page copy before and after a site migration, CMS update, or agency handover.
  • Translators and localization teams identifying which source strings changed between product releases to minimize retranslation scope.

Tips for More Useful Comparisons

A few settings choices can make the diff cleaner and easier to read.

  1. Use Line mode for code and structured data — Word mode can produce noisy output on code because variable names, brackets, and punctuation all register as individual tokens. Line mode groups changes at the logical unit level.
  2. Turn on Ignore Case for prose comparisons — If the original used "internet" and the revision capitalizes it as "Internet", that is not a meaningful change. Ignore Case prevents it from appearing as a diff entry.
  3. Use Show Only Differences to focus on changes — For long documents where most content is identical, switch the Display Filter to "Show only differences". This collapses unchanged sections so you can navigate directly to what changed.
  4. Export HTML to share annotated diffs — The HTML export preserves the colour coding. You can open it in any browser, attach it to an email, or print it as a PDF — useful for legal audit trails or editorial sign-off records.
  5. Use Similarity score as a health check — A 95%+ similarity score on an edited document suggests light proofreading. A 40% similarity score on what should be a minor revision is a red flag worth investigating before approving.

Why Text Comparison Matters

Most text changes happen invisibly. A document emailed back from a colleague, a contract returned from the other party, a webpage updated by a CMS — any of these can contain alterations that a plain reading would miss but a diff shows at a glance.

  • In legal contexts, an unsigned word change — swapping "shall" for "may", or adding "not" to a liability clause — can shift the meaning of an agreement entirely. Manual proofreading is unreliable at scale; a diff tool is not.
  • In software development, understanding exactly what changed between two versions of a configuration file, migration script, or API response is essential for debugging, rollbacks, and code reviews.
  • In SEO and content management, inadvertent copy changes during a site migration can wipe out carefully placed keywords, heading structures, or schema-friendly content. A before/after diff confirms nothing was lost.

Performance and Privacy

This diff checker runs entirely in your browser. Neither text is ever sent to a server, and nothing is stored or logged. That makes it safe for confidential contracts, internal emails, proprietary code or personal documents. Close the tab and your text is gone.

Key Concepts in Text Comparison

Diff

Short for "difference". A diff is a structured representation of the changes between two files or strings — typically a list of additions and deletions that transforms one text into the other.

Longest Common Subsequence (LCS)

The mathematical algorithm that underlies most diff tools. LCS finds the longest ordered sequence of tokens shared by both texts. Everything outside that sequence is treated as changed.

Patch

A patch is the output of a diff formatted so it can be applied to reconstruct the modified version from the original. The .patch and .diff file formats used in software development are standardized patch representations.

Unified diff

A display format that shows both additions and deletions in a single column, with removed lines prefixed by "−" and added lines by "+". This tool's unified view follows the same convention.

Split view

An alternative display that shows the original and modified texts side by side with corresponding lines aligned. Easier to read for prose; unified view is often preferred for code.

Troubleshooting

The comparison is not updating.
Make sure Live Diff is enabled, or click the Compare button manually. The tool requires JavaScript — check your browser settings if neither option responds.
The diff shows too many spurious changes.
Try enabling Ignore Case and Ignore Multiple Spaces to remove formatting noise. For code, switch to Line mode which avoids breaking changes at punctuation boundaries.
The export file is not downloading.
Check that your browser has not blocked downloads from this site. If the issue persists, copy the diff text manually using the Copy Text button.
Statistics look different from what I expected.
Statistics are calculated based on the selected comparison mode. Word mode counts word tokens; line mode counts lines. Switching modes will produce different counts for the same texts.

Did You Know?

The diff utility was written by Douglas McIlroy at Bell Labs and first released in Unix in 1974. It was one of the first tools to implement the Longest Common Subsequence algorithm practically, and McIlroy's original paper describing the algorithm is still cited in computer science literature today. When Linus Torvalds created Git in 2005, he built a new diff implementation optimized for source code — but the mathematical foundation McIlroy established over 50 years ago remains unchanged.

Conclusion

Whether it's a contract, a code file, a blog post or a colleague's edits, comparing text side by side is faster and more reliable than rereading both versions. Paste the two texts, pick a mode, and you'll see exactly what changed.

From the Blog