How to compare two texts
- Paste the original on the left and the new version on the right.
- Optionally tick Ignore spaces or Ignore case.
- Click Compare. Removed lines are red, added lines green, and changed words are highlighted.
How it works
The comparison uses the Myers algorithm, the same approach behind git diff: it finds the smallest set of line insertions and deletions that turns the first text into the second. When a line was edited rather than replaced, the changed words inside it are highlighted, so you don’t have to hunt for a single altered comma.
Ignore spaces treats lines that differ only in indentation or trailing spaces as equal, which is handy for code that was reformatted.
What we measured
Comparing two 5,000-line texts with scattered edits took 38 ms in Chrome on a 4-core test computer. Contracts, essays and config files of a few hundred lines are compared instantly.
When to use it
Seeing what a colleague changed in a contract or a press release. Checking an essay against the previous draft before submitting. Comparing two configuration files or JSON responses while debugging. Spotting a changed sentence in terms and conditions.
For JSON, run both sides through JSON Formatter & Validator first so formatting differences don’t hide the real changes. To check the length of the final text, use Word & Character Counter.
Limits
- The comparison is line by line. A paragraph pasted as one long line shows up as a single changed line, with word highlights inside it.
- Moved blocks appear as a deletion in one place and an addition in another.
- Very large, completely different inputs fall back to showing everything as removed and added, to keep the page responsive.
Frequently asked questions
Is my text uploaded?
No. Both texts are compared in your browser and never sent to a server, so it is safe for contracts and source code.
Can I compare Word or PDF files?
Copy the text out of each file and paste it here. Only plain text is compared, not formatting.
What does side by side do?
It shows the original on the left and the new version on the right, aligned line by line. On phones the unified view is easier to read.
Why are many lines marked when I only reformatted?
Turn on Ignore spaces. Changed line breaks still count, because the comparison is line by line.