How to compare two texts
Paste the original text on the left and the changed text on the right. The comparison appears below right away. Use Open file or drop a file onto a box to load .txt, .md, .csv, .json, .html and other plain text files. Drop two files at once and they fill both sides.
Removed text is red and added text is green. A changed line gets a light background, and the words or characters that actually changed get a stronger one. The arrow buttons above the result (Previous change, Next change) jump from one change to the next.
Copy diff copies the result in unified diff format, with − and + in front of removed and added lines, ready to paste into an email, a chat or a code review.
Views and highlighting
Long runs of unchanged lines are folded, keeping 3 lines of context around each change. Press Show N unchanged lines to expand them.
- Side by side: the original and the changed text sit next to each other with matching lines aligned. Best on a wide screen.
- Unified: one column with removed (−) and added (+) lines in turn. Easier to read on a phone.
- Words: highlights whole words. Good for English text and code.
- Characters: highlights single characters. Useful for Korean, Japanese and Chinese, and for spotting a changed digit. Emoji and combining characters count as one character.
Compare options
The summary above the result counts changed, added and removed lines. A line whose content was partly edited counts as changed; a line that exists on one side only counts as added or removed.
- Ignore whitespace: leading and trailing spaces and runs of spaces are treated as equal. A space that appears or disappears between two words still counts.
- Ignore case: Apple and apple are treated as the same.
- Ignore blank lines: added or removed empty lines are not counted as changes.
- Ignore line endings: Windows (CRLF) and Mac/Linux (LF) line endings, and a missing newline at the end, are treated as equal. On by default; turn it off to see lines that differ only in their line ending.
Private by design
The comparison runs entirely in your browser. Your text and files are not uploaded and not stored, so nothing is left once you close the page. That makes it safe for contracts, reports and other documents you cannot paste into an online service.
The work happens in a Web Worker, a separate thread inside the browser, so the page stays responsive even with texts of more than 10,000 lines.
Comparing Word documents and PDFs
This tool opens plain text files directly. For Word (.docx) or PDF files, open the document, select all (Ctrl + A), copy and paste it into each box. Tables and formatting are dropped, but every change in the wording shows up.
Word also has Review → Compare, which compares formatting too. Use this tool when you only need the wording, or when Word is not at hand.
FAQ
Is my text uploaded or saved?
No. The comparison runs in your browser, and your text and files are never sent anywhere or stored. Only the view and option settings are kept in this browser (localStorage).
Which files can I open?
Plain text files such as .txt, .md, .csv, .json, .html, .xml and .log. UTF-8 and UTF-16 are detected automatically, and other files are read as Windows-1252. The encoding and line endings (CRLF or LF) are shown under each box. For Word or PDF, copy and paste the text.
How long can the texts be?
Up to 200,000 lines on each side, and files up to 20MB. About 10,000 lines usually take under a second. When there are a huge number of changes, some parts are compared line by line only and a note says so.
The texts look the same, but every line is marked as changed. Why?
Invisible trailing spaces are a common cause; turn on Ignore whitespace. Files from Windows and from a Mac can also use different line endings (CRLF and LF); with Ignore line endings on, they compare as equal.
What is the difference between word and character highlighting?
If “3pm” becomes “4pm”, word highlighting marks the whole word and character highlighting marks only the digit. Words are easier to read for English and code; characters work better for languages without spaces.
What is a unified diff?
It is the standard text format for changes used by Git and code review tools. Each change is shown with 3 lines of context, removed lines start with −, and added lines start with +.
Something not working, or a feature you want? Send feedback