Text Diff Checker
Compare two texts side by side and see exactly what changed. Highlights additions, deletions, and unchanged lines.
Paste two versions of text to see additions (green) and deletions (red) highlighted line by line.
What Is a Text Diff and Why Developers Use It Daily
A diff (short for "difference") shows you exactly what changed between two pieces of text. Added lines, deleted lines, and modified lines — all highlighted clearly so you don't have to squint at two versions side by side. It's the foundation of every code review, every version control system, and every "track changes" feature.
Git uses diffs internally to track every change you've ever made. When you run "git diff", you see the same kind of output this tool generates. Code review tools like GitHub and GitLab display diffs to help teams review changes before they're merged.
This tool isn't just for code. Compare two versions of a contract, spot differences in API responses, verify config file changes, or check if two "identical" texts are actually identical. Paste the original on the left, the modified version on the right, and see every difference instantly.
Diff Algorithms Compared
| Algorithm | How It Works | Best For |
|---|---|---|
| Line-by-line | Compares entire lines as units | Code files, config files, structured text |
| Word-by-word | Compares individual words within lines | Prose, documentation, content changes |
| Character-by-character | Compares every single character | Finding typos, subtle whitespace differences |
| Myers (Git default) | Finds shortest edit distance between texts | General purpose, produces minimal diffs |
| Patience | Matches unique lines first, then fills gaps | Code with many similar lines (HTML, CSV) |
What this means for you: This tool uses a character-level diff for maximum detail. For code reviews, line-level diffs (like Git) are usually more readable. For finding subtle text differences, character-level is what you want.
Practical Uses for Text Diffs
Comparing API responses
Getting different results from an API call? Paste both responses and see exactly which fields changed. Great for debugging staging vs production differences.
Verifying config changes
Before deploying a config change, diff the old and new versions. This catches accidental modifications — a misplaced comma in JSON or a typo in a database connection string.
Document version comparison
Compare two versions of a legal document, specification, or email draft. The diff highlights every word that was added, removed, or changed — much faster than reading both versions manually.
Finding hidden characters
Two strings look identical but aren't equal? A diff can reveal invisible differences: trailing spaces, tab-vs-space issues, different line endings (CRLF vs LF), or zero-width characters.
Understanding Diff Output
| Indicator | Meaning | What To Look For |
|---|---|---|
| + Added (green) | Text exists in the new version but not the old | New features, additions, expansions |
| - Removed (red) | Text existed in the old version but was deleted | Deleted code, removed features |
| ~ Modified | Line exists in both but content changed | Edits, fixes, value changes |
| Unchanged | Identical in both versions | Context — helps you orient yourself |
Related Tools
How to use this tool
Paste the original text in the left box
Paste the modified text in the right box
Click Compare to see additions, deletions, and unchanged lines
Common uses
- Comparing API response versions during debugging
- Reviewing config file changes before deployment
- Checking document revisions for content differences
- Finding hidden character differences in strings
Share this tool