Diff Checker
This diff checker compares two versions of a text and shows what was added, removed or changed, line by line and word by word.
How to compare two texts
- Paste the original on the left and the new version on the right. The comparison updates as you type.
- Removed lines are red, added lines green, and in changed lines the exact words that differ are highlighted.
- Switch between Side by side and Inline, ignore whitespace or case, or press Swap to reverse the comparison.
Example: what a diff shows
Comparing two versions of a policy text, the inline view shows:
Shipping policy
− Orders are shipped within 3 business days.
+ Orders are shipped within 2 business days.
Shipping is free for orders over $50.
− Returns are accepted within 14 days.
+ Returns are accepted within 30 days of delivery.
+ Gift cards cannot be returned.
− Contact us at support@example.com.
+ Contact us at help@example.com.Three lines changed and one was added. Inside the changed lines only 3→2, 14→30 plus of delivery, and the email address are highlighted.
What people compare
- Two drafts of a contract, article or policy, to see exactly what was edited.
- Configuration files before and after a change, such as .env or YAML files.
- Code snippets, SQL queries or JSON responses from two environments.
- Translations or exported lists, to spot missing or reordered lines.
For structured data, format both sides first — the JSON formatter, SQL formatter or HTML formatter — so that layout differences don't hide real changes.
How the comparison works
The checker uses the Myers algorithm to find the smallest set of line insertions and deletions that turns one text into the other — the same idea behind git diff. Lines that were edited rather than added or removed are then compared word by word. The work runs in a background thread, so even long documents don't freeze the page, and unchanged stretches are folded so you can focus on the changes.
Related text tools
Draft and keep text in the online notepad, strip markup with HTML to text before comparing web pages, or search both versions for a pattern with the regex tester.
Frequently asked questions
- How does the diff checker compare texts?
- It aligns the two texts line by line with the Myers diff algorithm — the same approach git uses — to find the smallest set of added and removed lines. Lines that changed are then compared word by word, so you see exactly which words differ.
- What do ignore whitespace and ignore case do?
- Ignore whitespace treats runs of spaces and tabs as one space and ignores leading and trailing spaces, so re-indented code compares as equal. Ignore case treats upper- and lowercase letters as the same. The texts are shown unchanged either way.
- Can I compare large files?
- Yes. The comparison runs in a background thread, so the page stays responsive, and long unchanged stretches are folded. Very different texts with thousands of changes are shown as one replaced block instead of being aligned line by line.
- Are my texts uploaded?
- No. Both texts stay in your browser. That makes the tool safe for contracts, configuration files and code you can’t share.
- What is the difference between side-by-side and inline view?
- Side by side shows the original on the left and the changed text on the right, aligned line by line. Inline shows one column with removed lines (−) directly above the lines that replaced them (+), like a git diff.