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.
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:
- Tokenize both texts into units (words, lines or characters depending on mode).
- Find the longest sequence of tokens that appears in the same order in both texts. Those are the "unchanged" parts.
- Mark everything else as either removed (in old but not new) or added (in new but not old).
- 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:
- Editing articles and blog posts
- Reviewing contracts and legal documents
- Checking email drafts against a template
- Comparing resumes and cover letters
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:
- Comparing code versions before a commit
- Reviewing configuration file changes (`.env`, `.json`, `.yaml`)
- Checking CSV or spreadsheet exports
- Reviewing Markdown documents
Character diff
The most granular view β shows exactly which characters changed. Useful for:
- Proofreading for typos
- Comparing almost-identical text where a single character matters
- Debugging subtle formatting issues
- Verifying encoded strings (base64, hex, hashes)
Side-by-side vs inline view
- Side-by-side β old text on the left, new text on the right, changes highlighted on both sides. Great for whole-document comparison and seeing structure. Matches how GitHub and most code review tools display diffs.
- Inline (unified) β a single stream of text with removed parts struck through and added parts underlined. Better for long documents where you want to scroll through changes in reading order. Matches how Git's
diff -ushows changes.
Common use cases
- Writers and editors β compare draft versions to see what changed between revisions.
- Developers β review code changes before committing or after merging.
- Lawyers and paralegals β compare contract versions to catch every edit.
- Translators β verify that translated text matches the source structure.
- Students β compare essay revisions and check edits from teachers.
- Content marketers β compare SEO copy drafts and approve changes.
- Anyone β check whether two texts are actually identical (spot hidden differences).
Options explained
- Case sensitive β when ON, "Hello" and "hello" are treated as different. When OFF, they're treated as the same word. Useful when comparing content where capitalization doesn't matter.
- Ignore whitespace β when ON, multiple spaces collapse to one, and extra line breaks are ignored. Good for comparing text that has been reformatted but not actually edited.
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?
What is the best way to compare two texts?
How does the diff algorithm work?
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.