Text compare
Compare two texts and highlight the differences, down to the word and character.
1. Enter the two texts
Paste or type the original text and the new text. They're compared as soon as you enter them.
Original text
0 characters · 0 lines
New text
0 characters · 0 lines
2. Check the differences
Removed text is shown in gray with a strikethrough, and added text in orange.
Differences in spaces, tabs and full-width spaces, or in how many there are, aren't counted. Treats “Apple” and “apple” as the same.
View
Enter two texts and the differences appear here
Everything runs on this device. What you enter is never sent anywhere.
Line endings (Windows or Mac) and whether there's a line break at the end aren't compared.
Found it useful? We'd love a share
Something not working, or an idea to make it better?
How to use
1. Enter the two texts
Tap “Paste” on the “Original text” box at the top to put in the text before your edits. Then tap “Paste” on the “New text” box below it to put in the text after your edits. The differences appear below right away.
Click “Paste” above the “Original text” box on the left to put in the text before your edits. Then click “Paste” above the “New text” box on the right to put in the text after your edits. You can also type, or open a text file with “Open file”. The differences appear below right away.
2. Check the differences
In the list below, removed lines (−) and added lines (+) are stacked one above the other. Removed characters are shown in gray with a strikethrough, and added characters in orange. Tap “Next” to jump to the next difference, which gets an orange outline.
In the list below, the original text is on the left and the new text on the right, with matching lines lined up. Removed characters are shown in gray with a strikethrough, and added characters in orange. Click “Next” at the top right of the list to jump to the next difference, which gets an orange outline.
3. Change how texts are compared
Turn on “Ignore whitespace” above the list, and differences in the number of spaces or in full-width spaces are no longer counted. To also ignore uppercase and lowercase differences, turn on “Ignore case”. The list updates instantly.
Turn on “Ignore whitespace” above the list, and differences in the number of spaces or in full-width spaces are no longer counted. Under “View”, click “Single column” to stack removed and added lines one above the other. The list updates instantly.
Great for
Seeing what was changed in a draft
Paste the edited draft and the original, and only the rewritten parts are highlighted. Even a one-letter fix won't slip by.
Writers, editors and students
Checking changes to a contract or terms
Put the old and new versions side by side and quickly find changed wording or new clauses. Confidential text never leaves your device.
Legal and admin staff
Seeing what AI or a proofreader changed
Compare your text before and after, and see exactly what was changed and how. You'll catch edits you didn't ask for, too.
Anyone who writes
Comparing config files or code
Compare two configs, or old and new logs or CSVs, with line numbers. If only the indentation differs, “Ignore whitespace” hides it.
Engineers and server admins
Good to know
- Word and PDF files can't be opened. Copy the text inside and paste it in.
- Paragraphs that were moved are shown as removed lines and added lines.
- You can't pick differences one by one and merge them into the other text.
About comparing texts
A diff finds which parts of two texts are the same, which were removed and which were added. This tool first compares line by line and lines up the matching lines. For lines that were rewritten, it then compares inside the line in finer detail and marks only the parts that differ.
Languages like Japanese and Chinese don't put spaces between words, so comparing word by word would make a whole sentence look different after a one-character fix. So Chinese characters and Japanese kana are compared one character at a time, while English and other languages that separate words with spaces are compared word by word. Tiny scattered matches, like a single shared letter, are merged into the difference so it's easier to read.
FAQ
Answers to common questions before you start.
Is my text sent anywhere?
No. The comparison happens entirely in your device's browser, and nothing you enter is sent to a server or saved. You can safely compare confidential documents or text with personal information.
Does it show the exact words that changed?
Yes. Inside a changed line, only the words that differ are highlighted, so a fix like “12” to “13” or “a” to “the” is easy to spot. Japanese and Chinese are compared character by character.
What do the colors mean?
Text removed from the original is shown in gray with a strikethrough, and text added in the new version is shown in orange. When only part of a line differs, just those characters are marked. When a whole line was removed or added, the whole line gets a colored background.
What does “Ignore whitespace” do?
Differences in spaces, tabs and full-width spaces, whether they're there or how many there are, are no longer counted. It's handy for code where only the indentation changed, or text that differs only in spacing.
Do different line endings (Windows vs. Mac) count as differences?
No. Line endings (CRLF and LF) are made the same before comparing. Whether there's a line break at the very end isn't compared either.
What does “Show unchanged lines” mean?
Where many unchanged lines run in a row, only the 3 lines before and after each difference are shown, and the middle is collapsed. Click “Show unchanged lines” to expand them. This makes the differences easier to find in long texts.
Does it work on my phone?
Yes. On phones, lines from the original and new text are stacked in a single column, so nothing gets cut off on a narrow screen. On a computer, you can switch between side by side and single column.
Can it compare long texts?
Yes, even texts with tens of thousands of lines. Long texts are compared separately once you stop typing, so the page doesn't freeze. Files up to 20 MB can be opened. When there are a great many differences, some may be shown as whole lines.
Can I compare Word or PDF files?
Not as files. Open the Word or PDF file, copy the text inside, and paste it into each box. Text files (.txt, .md, .csv and so on) can be opened with “Open file”.
Is it free?
Yes, it's free. No sign-up and no ads.
More tools
- JSON formatter
Pretty-print JSON or minify it to one line. If there's a mistake, it shows you where.
- Password generator
Choose the length and characters to make hard-to-guess passwords on the spot.
- Convert images to WebP
Turn PNG or JPEG into WebP, a lighter format that still looks great.
- Convert images to PNG
Turn JPEG or WebP into PNG, a format that never loses quality.
- Convert images to JPG
Turn PNG or WebP into JPG (JPEG), a format that opens anywhere.
- Convert HEIC to WebP
Turn iPhone HEIC photos into WebP, a lighter format that's easy to use.