Text Tools

Free Text Diff Checker

Compare two texts side-by-side and highlight every difference instantly. Word, line and character modes. Perfect for editing, contracts and code reviews.

Instant Diff 100% Private Word / Line / Char Works on Mobile
Mode
View
Original Text OLD
0 chars Β· 0 words Left side
Modified Text NEW
0 chars Β· 0 words Right side

Comparing texts…

Running LCS diff algorithm

Enter text in both boxes to compare

Paste the original text on the left, the modified text on the right, then click Compare Texts. Every difference will be highlighted.

What Is a Text Diff Checker?

A text diff checker compares two pieces of text and highlights exactly what changed between them. Every word, line or character that was added, removed or modified is colour-coded so you can spot differences in seconds β€” no more reading both texts side-by-side looking for subtle changes.

Diff tools are used everywhere: developers compare code before merging branches, editors compare drafts, lawyers compare contracts, translators compare revisions, students compare essay versions. This tool brings that same power to any text you paste in.

The three diff modes

Mode How It Works Best For
Word Compares text token-by-token, treating each word as a unit. Prose, articles, contracts, emails, general writing.
Line Compares text line-by-line, preserving line structure. Code, config files, JSON, CSV, structured data.
Character Compares text character-by-character, showing micro-changes. Typos, small edits, punctuation changes, proofreading.

How the diff algorithm works

We use the Longest Common Subsequence (LCS) algorithm β€” the same approach used by Git, GitHub, and Unix diff. Here's how it works in plain English:

  1. Tokenize both texts into units (words, lines or characters depending on mode).
  2. Find the longest sequence of tokens that appears in the same order in both texts. Those are the "unchanged" parts.
  3. Mark everything else as either removed (in old but not new) or added (in new but not old).
  4. Render the result with colours so you can scan it visually.

LCS is fast, deterministic and produces the minimum possible diff β€” meaning the smallest set of changes that could transform the old text into the new text.

Word vs Line vs Character diff β€” when to use each

Word diff

The default and best for most use cases. Every word is a unit, so changes are highlighted at word level. Whitespace changes (spacing, line breaks) are ignored so the diff focuses on the actual content. Perfect for:

Line diff

Treats each line as a single unit β€” exactly like Git's diff. Shows whole lines as added or removed without breaking them into words. Best for:

Character diff

The most granular view β€” shows exactly which characters changed. Useful for:

Side-by-side vs inline view

Common use cases

Options explained

Privacy and security

This text diff checker runs entirely in your browser. Your text is never sent to any server, never stored anywhere, and disappears the moment you close the tab. Safe for confidential documents, unreleased content, legal text and private client work.

Frequently Asked Questions

What is a text diff checker?
A text diff checker is a tool that compares two pieces of text and highlights the differences between them. It shows what was added, removed or changed, word by word or line by line. It is used by writers, editors, developers, lawyers and anyone who needs to see exactly what changed between two versions of a document.
What is the best way to compare two texts?
The best method depends on what you need: (1) word-by-word diff for prose, contracts and general text; (2) line-by-line diff for code, config files and structured data; (3) character-by-character diff for spotting small typos or subtle edits. Our tool supports all three modes.
How does the diff algorithm work?
We use the Longest Common Subsequence (LCS) algorithm β€” the same approach used by Git, GitHub and Unix diff. It finds the longest sequence of tokens (words, lines or characters) that appear in the same order in both texts, then highlights everything that is not part of that sequence as added or removed.
Is my data safe?
Yes. The comparison happens entirely in your browser using JavaScript. Nothing is uploaded to any server, nothing is stored, and your text disappears the moment you close the tab.
Can I compare code files?
Yes. Switch to line-by-line mode for the best results with code. It preserves indentation and whitespace, so you can see exactly which lines changed between two versions of a file.
Does it ignore whitespace or case?
You can toggle case sensitivity. When ignored, "Hello" and "hello" are treated as identical. Whitespace mode collapses multiple spaces and line breaks so that formatting changes don't show as diffs.
What does the "Swap Sides" button do?
It swaps the original and modified texts. This is useful when you want to see the diff from the other direction β€” for example, to check what would be lost if you reverted a change.
Is this text diff checker free?
Yes. It is 100% free, requires no sign-up, and runs entirely in your browser. Your text never leaves your device.

Related Text Tools

Done!