How to compare two texts
- 1.
Paste the texts
Put the original in the left box and the changed version in the right box.
- 2.
Choose options
Ignore whitespace or case if needed, and pick word or character highlighting.
- 3.
Review or copy
Use side-by-side or unified view, and copy the result as a unified diff.
How it works
The tool uses the Myers diff algorithm (the one behind git diff) to find the shortest edit script between the two texts, line by line. Adjacent removed and added lines are treated as a changed line and diffed again at word or character level. Everything runs in your browser; handles documents up to about 10,000 lines.
Side-by-side vs unified view
Side by side shows both versions with line numbers - the easiest way to read changes. Unified merges them into one list: removed lines are marked “−” and added lines “+”. The copied result uses the standard diff format:
--- a
+++ b
@@ -1,5 +1,5 @@
a
b
-c
+X
d
eThe hunk header @@ -1,5 +1,5 @@ means: starting at line 1, five lines in the old version and five in the new one. Each hunk includes three lines of context, so you can paste it into a code review, a ticket or an email.
Options and limits
- Ignore whitespace - spaces, tabs and indentation are not treated as differences. Useful after reformatting code.
- Ignore case - “Text” and “text” count as the same.
- Only changes - hides unchanged lines and keeps three lines of context around each change.
- Word or character highlighting - words suit prose and contracts; characters catch a changed comma or digit.
Different line endings (Windows CRLF vs Linux LF) are not reported as differences. The tool handles documents of up to about 10,000 lines; with thousands of changes only the first part of the result is shown until you click “Show all”.
What people use it for
- Contracts and policies - spot which clauses changed between two drafts.
- Config files and code - compare .env, JSON or YAML before a deployment. Beautify JSON with sorted keys first in the JSON formatter so the keys line up.
- Edited copy - check a proofreader’s changes with character highlighting to catch punctuation fixes.
Frequently asked questions
Is my text uploaded?
+
What is unified diff?
+
Can I ignore whitespace or case?
+
What does “changed line” mean?
+
Can I swap the two texts?
+
Updated: