Text Diff Checker
Paste two texts to instantly see line-by-line differences highlighted in red and green.
How to use Text Diff Checker
The Text Diff Checker provides a clean, focused interface for spotting differences between two text passages with character-level precision. It highlights changed words inline within each line, making it easy to spot subtle wording changes — a single letter difference in a legal clause, a transposed number in a configuration value, or an altered email address in a contact list — that line-level diffs might present as complete replacements.
- Enter or paste the original text in the "Before" panel on the left.
- Enter or paste the revised text in the "After" panel on the right.
- Differences are highlighted immediately: red background for removed content, green for added content.
- Toggle "Character diff" to see exactly which characters changed within each word.
- Toggle "Ignore case" to suppress differences that are only a matter of capitalisation.
- Click "Copy diff" to copy a plain-text summary of all changes to the clipboard.
Your data never leaves your device — 100% private processing.
Character-level vs line-level diffing
Line-level diffing marks an entire line as deleted and replaced when even one character changes, which makes it hard to spot subtle edits. Character-level (or word-level) diffing goes deeper: within a changed line, it identifies exactly which characters or words were removed or inserted. This is implemented by running a second diff pass on the changed line pairs. Character diff is most useful for prose, configuration files and data records where minor changes carry significant meaning. Line diff is more useful for code, where any change to a line often requires reading the whole line in context.
Comparing structured text and data
When comparing structured formats like JSON, XML, CSV or YAML, raw text diff can be misleading because equivalent data may be expressed in different ways (different key ordering in JSON, different indentation in YAML, different column ordering in CSV). For best results with structured data, format or sort the content consistently before diffing — use the JSON Formatter to canonicalise JSON before pasting it into the diff checker. For CSV, ensure columns appear in the same order in both versions.
| Format | Normalisation step | Tool to use |
|---|---|---|
| JSON | Sort keys + pretty-print with 2 spaces | JSON Formatter |
| YAML | Use consistent indentation (2 spaces) | YAML linter |
| CSV | Sort rows by key column, align column order | Spreadsheet / sort command |
| HTML | Format and alphabetise attribute order | HTML formatter |
| SQL | Format with consistent capitalisation and indentation | SQL formatter |
| Prose / plain text | Trim trailing spaces, normalise line endings | Find & Replace (\r\n → \n) |
Glossary
- Inline diff
- A diff view where additions and deletions are shown within the same text flow, highlighted in colour.
- Character diff
- A diff that operates at the character level within changed lines, identifying the exact characters that changed.
- Patch
- A file containing diff output that can be applied to the original to reproduce the revised version.
- Context lines
- Unchanged lines displayed around changed lines in a diff to help orient the reader.
- Semantic diff
- A diff that understands the structure of a format (e.g., JSON, XML) and compares semantically equivalent representations as identical.
Related reading
Frequently Asked Questions
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Why use Text Diff Checker?
- Instant results with no signup or account creation
- Works offline once the page is loaded
- Supports Unicode and multilingual text
- Copy results to clipboard with a single click
Common use cases
- Count words in an essay before submission
- Sort a list of items alphabetically
- Remove duplicate lines from CSV exports
- Change the case of text copied from PDFs
- Find and replace text across large documents
Related Text Tools
Word Counter
Count words, characters, sentences, and paragraphs, and estimate reading time. Free, instant, and private — ideal for essays, articles, and posts.
Case Converter
Convert text to camelCase, PascalCase, snake_case, kebab-case, UPPERCASE, lowercase, Title Case, and Sentence case instantly.
Lorem Ipsum Generator
Generate Lorem Ipsum placeholder text in paragraphs, sentences, or words. Optionally wrap in HTML paragraph tags.
Text Diff Checker
Compare two texts and see the differences highlighted. Line-by-line diff with added, removed, and changed lines clearly marked.
Find and Replace Text
Find and replace text online with support for regex, case sensitivity, and whole word matching. Bulk text replacement tool — free and private.
Remove Duplicate Lines
Remove duplicate lines from text online. Case-sensitive or insensitive matching. Preserves order or sorts alphabetically. Free online tool.
Explore all Text Tools.