Text diff
Compare two versions of text and view the additions and deletions side by side.
Up to 200,000 characters and 5,000 lines per input. Spaces and case are compared as entered. Browser text inputs normalise line endings.
How to use text diff
- Paste the first version into Original text and the second version into Updated text.
- Select Compare text. Deletions appear on the left and additions on the right.
- Use Previous change and Next change to move between changed rows. Each column shows its own source line numbers.
You can compare an empty input with text to view all additions or deletions. Editing either input clears the previous result so you can run a new comparison.
When to use it
Check edits to an email or article, compare two sets of notes, or review changes to a plain-text configuration file. For code, JSON, and CSV, this tool compares the text rather than interpreting its structure.
Example
If the original contains Status: Draft and the updated version contains Status: Reviewed, the comparison marks the changed words. Inserted and deleted lines are aligned with blank spaces in the opposite column.
Privacy and data handling
Your text and comparison results stay in this browser. The tool does not upload them, save them to local storage, or include them in the page URL.
The Paste buttons read your clipboard only when you select them. Your browser may request permission. You can also paste directly into either input.
The site saves your light or dark theme choice on this device. Your browser may restore form fields when you revisit a page; clearing an input removes its current contents. See the privacy page for site-wide details.
Limitations
The comparison is case-sensitive and includes whitespace. Line breaks are shown with ↵. Browser text inputs normalise Windows and Unix line endings, so this tool does not distinguish those formats. Some Unicode characters use multiple code units, which can affect character-level highlights.
Inputs are limited to 200,000 characters and 5,000 lines each to protect browser performance. Complex comparisons use a time limit, so the highlighting may group a large change rather than show the smallest possible edit. Moved text is shown as a deletion and an addition.
Comparison library
This tool uses an unmodified copy of Google's Diff Match Patch library. Google archived the project in 2024. The library is included locally under the Apache 2.0 licence; it is not loaded from a third-party server.