Text Diff Checker
Paste two versions of the same text and instantly see exactly what changed. Added lines show in green, removed lines in red, and unchanged lines stay neutral, with a count of each above the result.
Built for code reviews, draft revisions, config files, and contract redlines. The comparison runs entirely in your browser, so the text you paste is never uploaded, stored, or sent anywhere.
How to Compare Two Texts
- Paste the original in the left pane and the revised version in the right pane. Open a file, select all, copy, and paste if you are comparing files.
- Click Compare. The tool runs a line-based LCS diff and lines the two versions up, even when whole blocks were added or removed.
- Read the colors. Green lines with a + were added, red lines with a − were removed, and neutral lines are unchanged.
- Check the counts above the result for a quick summary of lines added, removed, and unchanged.
- Reuse the result. Swap Sides reverses the comparison, Copy Diff copies the marked-up result, and Clear resets both panes.
What You Can Compare
- Code revisions: check what changed between two versions of a function, script, or config file before committing or reviewing.
- Drafts and essays: see every edit between drafts of an article, resume, or cover letter at a glance.
- Contracts and policies: spot added or deleted clauses between two versions of an agreement.
- Data and lists: find missing or extra rows between two CSV exports, inventories, or changelogs.
- Logs and output: compare a before-and-after run to isolate what a change actually did.
This is a read-only comparison: it shows differences, it does not merge them. Line-level diffs also do not detect moved blocks, so a paragraph moved elsewhere appears once as removed and once as added, the same behavior as Git's default diff.
Frequently Asked Questions
How does the text diff checker work?
It runs a line-based LCS (longest common subsequence) algorithm in your browser to find the longest matching sequence of lines. Anything not in that sequence is marked as added or removed.
Is my text uploaded anywhere?
No. All processing is 100% client-side in vanilla JavaScript. Your text never leaves your device.
What's the difference between line-level and character-level diffs?
Line-level compares whole lines as units, which is faster and matches how Git and most code review tools display diffs. Character-level highlights individual characters.
Can I diff code files?
Yes. Paste the old and new versions of any plain text — source code, config, markdown, or logs.
Is there a size limit?
No hard limit, but LCS is O(n*m). Keep each side under a few thousand lines for instant results.
Can I compare two Word documents or PDFs?
Not directly. Copy the plain text out of each document and paste it into the two panes. The tool compares text only, so fonts, colors, images, and formatting are not compared.
Can I ignore whitespace or letter-case differences?
No. This tool compares lines exactly, so an indentation change or a capitalization change shows up as a changed line. Nothing is silently hidden, so no real edit slips past.
Why does a moved paragraph show as deleted and added?
Line-level diffs do not detect moves. When a block disappears from one place and reappears elsewhere, it is reported once as removed and once as added. That is the same behavior as Git's default diff.