Text Diff & Compare
Compare two text snippets line by line with inline word highlighting and unified diff export.
About this tool
Whether you're reviewing code changes, comparing configuration files, or checking document revisions, a fast text diff is essential. This tool runs entirely in your browser using a classic LCS (Longest Common Subsequence) algorithm to find added, removed, and replaced lines with word-level precision. Nothing leaves your machine.
How to use the Text Diff & Compare
- Paste your original text in the left pane
- Paste your modified text in the right pane
- Click Compare to generate the diff
- Review additions in green, deletions in red, and inline word replacements
- Click Copy diff to export a unified diff to your clipboard
Features
- Line-by-line diff with number annotations
- Word-level highlighting on modified lines
- Added lines highlighted in green
- Deleted lines highlighted in red with strikethrough
- One-click unified diff export
- 100% client-side, no server upload
Frequently asked questions
Is this text diff tool free?
Yes. Compare two texts online for free with no signup or data upload.
Can I compare code with this tool?
Yes. The diff works on any text, including source code, config files, JSON, YAML, and Markdown.
What algorithm does it use?
It uses a Longest Common Subsequence (LCS) algorithm to find additions, deletions, and word-level replacements.
Is my text sent to a server?
No. Everything runs client-side. Your text is never uploaded or stored anywhere.