Compare essays, articles, emails, contracts, or any plain text
How the Diff Algorithm Works
This tool uses the Myers diff algorithm — the same algorithm used by Git, GitHub, and most version control systems. Myers diff finds the shortest possible edit script between two texts: the minimum number of line insertions and deletions needed to transform Version A into Version B.
This matters because a naive comparison approach — comparing lines position by position — produces misleading results whenever lines are inserted or deleted in the middle of a file. Everything after the insertion shifts, so the entire rest of the file appears to have changed even though only one line was added. Myers avoids this by computing the longest common subsequence first, then showing only the lines that genuinely differ.
For character-level highlighting inside a changed line, the same algorithm runs again at the character level. This is what lets you see exactly which word changed in a sentence, or exactly which part of a SQL WHERE clause was removed, rather than just seeing that the line is different.
Common Use Cases
Reviewing AI-Generated Code
Paste your original function in Version A and the AI-suggested version in Version B. The diff immediately shows which lines were removed, added, or modified. Pay special attention to red lines — deleted code is where silent bugs typically hide.
Comparing Document Drafts
Compare two versions of a contract, report, policy document, or essay. Every added sentence and deleted paragraph is visible at a glance, so you never miss a change that should not have happened.
Verifying SQL Query Changes
Before running a modified database query, compare it with the original. A missing WHERE clause or a changed JOIN condition shows up immediately as a removed line — before it reaches your database.
Config File Comparison
Compare staging and production configuration files before deploying. Environment variables, feature flags, and connection strings that differ between environments show up line by line.
Translation Review
Compare a first translation against a reviewed revision to see exactly which terms the reviewer changed. This makes it easier to understand translation decisions and apply them consistently across other documents.
Academic and Editorial Review
When an editor returns your draft, paste both versions to see every word that changed. This is faster than reading both versions sequentially and lets you evaluate each change independently.
Recommended Workflow When Using AI Tools
The most reliable way to use this tool in an AI-assisted workflow is to establish a consistent compare-before-accept habit. Here is the specific sequence that works well in practice:
- Write or locate the original text, code, or document you want to improve.
- Submit it to your AI assistant and copy the response.
- Open this tool. Paste the original in Version A and the AI output in Version B.
- Read the red lines first. Red lines are what was removed. This is where unintentional deletions happen — missing validation checks, dropped filter conditions, removed citations.
- Check the similarity score. A light editing pass should produce 85%+ similarity. A structural rewrite might be 60–70%. If you asked for minor cleanup and got 40% similarity, something significant changed.
- Accept what is correct, restore what was incorrectly removed, and proceed with a verified version.
This process takes about 60 seconds per AI interaction. It has a much higher return on investment than re-reading the AI output from scratch, because the diff focuses your attention exactly where the changes are rather than asking you to hold the entire original in memory while reading the new version.
Tool Features
- ✓Myers diff algorithm: The same algorithm used by Git. Finds the minimum edit distance between two texts, producing clean and accurate diffs even when lines are moved or reordered.
- ✓Character-level highlighting: Inside any changed line, the exact characters that were added or removed are highlighted separately. You see not just that a line changed, but precisely what in the line changed.
- ✓Syntax highlighting for code: In Code mode, keywords, strings, comments, and numeric literals are color-coded. Works across JavaScript, Python, PHP, SQL, Java, Rust, Go, and most other languages without configuration.
- ✓Similarity score: A percentage showing how much of the original content is preserved in the modified version. Useful for quickly gauging whether an AI change was minor or substantial.
- ✓Diffs only mode: Toggle to hide unchanged lines and show only what changed. Useful for long files where the differences are small and you want to focus entirely on the delta.
- ✓Copy diff output: Export the full comparison as a unified diff string for pasting into bug reports, code reviews, or documentation.
- ✓200,000 character limit: Each input handles up to 200,000 characters — approximately 4,000 to 5,000 lines of typical source code. Sufficient for the vast majority of real-world files.
- ✓Fully offline: After the page loads, no internet connection is required. All processing runs in your browser. Your text never leaves your device.
Frequently Asked Questions
Your data stays on your device
All comparison processing happens in your browser using JavaScript. The text and code you paste is never transmitted to any server, stored in a database, or logged anywhere. After the page loads, you can disconnect from the internet and the tool continues to work identically.