About the Text Compare
Paste an original text on the left and a changed version on the right, and Text Compare highlights every difference. Removed text is marked in red, added text in green, and inside a changed line the exact words that differ are highlighted too.
Use it to see what someone edited in a contract or an article, to check two versions of a configuration file, to find the one line that differs in a long list, or to proofread a translation update. You can compare by lines, by words or by single characters, and ignore differences in capitals or spacing when they do not matter.
The result can be shown side by side or in one column, folded down to just the changed parts, and exported as a standard .diff file. Both texts stay in your browser and are never uploaded.
How to use it
- Add both textsPaste the original on the left and the changed version on the right, or use Open or drag and drop to load files. Sample loads two versions of a short notice.
- Choose how to compareLines shows changed lines with the changed words highlighted. Words and Characters show the full text with every inserted or deleted word or character marked.
- Ignore what does not matterTurn on Ignore case to treat "Hello" and "hello" as equal, and Ignore spaces to skip differences in spacing.
- Pick a layoutIn Lines mode, choose Side by side or Inline, and turn on "Only changed lines" to hide long unchanged parts.
- Export the changesCopy diff or Download .diff gives you the changes in unified diff format, the format used by Git and code review tools.
Key features
Three levels of detail
Compare whole lines, single words or individual characters, depending on how small the changes are.
Changed words highlighted
When a line was edited, the words that changed are marked inside it, so you do not have to hunt for them.
Side by side or inline
See both versions next to each other with line numbers, or in one column with - and + markers.
Only changed lines
Long stretches of identical text fold into a single row, with three lines of context kept around each change.
Ignore case and spacing
Skip differences in capitals or in the number of spaces, tabs and line-end spaces.
Unified .diff export
Copy or download the changes as a patch that Git, code editors and review tools can read.
Examples
Comparing two versions of a notice
The Sample button loads an original and an edited version of an opening hours notice. The changed version has new weekday hours, an extra line for holidays and a reworded sentence.
| Compare by | Status line | What is highlighted |
|---|---|---|
| Lines | 3 added · 2 removed, 5 lines unchanged | Two changed lines and one new line. Inside them, 9 and 5 become 8:30 and 6, and "an email" becomes "us a message". |
| Words | 7 words added · 4 removed | The same changes, shown in the flowing text instead of line by line. |
| Characters | 30 characters added · 6 removed | Only the letters that differ. In "an email" versus "us a message", the letters "n", "e" and "il" are marked as removed and "us ", "ess" and "ge" as added. |
In Lines mode, a line that was edited counts once as removed and once as added, which is why the count says 3 added and 2 removed.
The exported diff
Download .diff for the sample produces a standard unified diff:
===================================================================
--- original.txt
+++ changed.txt
@@ -1,7 +1,8 @@
Opening hours
-Monday to Friday: 9 AM to 5 PM
+Monday to Friday: 8:30 AM to 6 PM
Saturday: 10 AM to 2 PM
Sunday: closed
+Holidays: closed
-Call us at (555) 010-0199 or send an email.
+Call us at (555) 010-0199 or send us a message.
We reply within two business days.
\ No newline at end of file
Lines starting with - were removed, lines starting with + were added, and lines starting with a space are unchanged context. The last line notes that the text does not end with a line break.
Ignoring case and spacing
Compare Hello World and second line on the left with hello world and second line on the right:
| Settings | Result |
|---|---|
| Neither option | 2 added · 2 removed |
| Ignore case | 1 added · 1 removed, because the spacing still differs |
| Ignore case and Ignore spaces | No differences |
Finding one changed line in a long file
Compare two 30-line lists where only line 15 differs and turn on "Only changed lines". You see lines 12 to 18 and two folded rows: "11 unchanged lines" above and "12 unchanged lines" below.
Tips
- Start with Lines for documents and code, then switch to Words or Characters when a line is marked as changed but you cannot see why. A changed comma or an extra space then becomes obvious.
- If every line shows as changed, one of the texts probably has different spacing or capitalization. Turn on Ignore spaces or Ignore case and look again.
- Swap exchanges the two texts. Use it when you pasted them the wrong way round, so additions and removals show in the right colors.
- Save the .diff file when you need a record of what changed between two versions, for example when you send edits back to a colleague.
- To compare JSON, use the JSON Diff Checker. It compares the data itself, so differences in indentation and line breaks do not show up as changes.
Common mistakes and limits
- Comparing text with different line breaksIf one version is wrapped at 80 characters and the other is not, almost every line differs. Compare by Words, or remove the line breaks from both versions first.
- Expecting moved text to be detectedA paragraph moved to another place shows as removed in one spot and added in another. The tool does not mark it as moved.
- Reading Lines mode counts as editsAn edited line counts as one removed and one added line. Two edited lines therefore show as 2 added and 2 removed.
- Forgetting the exported diff ignores the optionsCopy diff and Download .diff compare the texts exactly as typed. Ignore case and Ignore spaces only affect what is shown on screen.
- Comparing formatted documentsBold, colors, comments and tracked changes from Word or Google Docs are lost when you paste plain text. Only the text itself is compared.