How to Compare Text Online
The Text Diff tool shows you exactly which lines changed between two versions of a text. Paste your original in the left panel and the updated version in the right, and you get an instant line-by-line breakdown: what was added, what was removed, and what stayed the same.
Compare your texts now. Free, nothing to install.
Open Text Diff Tool →What the diff shows you
The result highlights three types of lines:
- Added lines (green): lines present in Text B that weren't in Text A. New content.
- Removed lines (red): lines present in Text A that aren't in Text B. Deleted content.
- Unchanged lines (default): lines identical in both texts. These provide context around the changes.
Line numbers are shown alongside the diff so you can find the exact location of each change in the original documents.
Side-by-side vs unified view
On desktop the diff shows both texts in a side-by-side layout. Text A on the left, Text B on the right, with changed lines highlighted in each. This makes it easy to read the before and after of each change without losing context.
Unified view collapses both texts into a single column, showing changes interleaved. It's more compact and works better on narrow screens. On mobile the tool defaults to unified. You can switch between both views at any time.
Ignoring whitespace and case
Two options in the settings panel change how the comparison works:
- Ignore Whitespace: lines that differ only in spacing (leading, trailing, or internal) are treated as identical. Useful when comparing text from editors that apply different indentation or line-wrap rules.
- Ignore Case: lines that differ only in capitalisation are treated as identical. Useful for comparing text from different systems that handle case inconsistently.
Downloading the result
Two download options are available:
- Diff: standard unified diff format with
a
---/+++header. This is the same format git uses. Any code review tool or diff viewer can read it. - Summary: a human-readable version organised into three sections (Updated, Removed, Added) with line numbers and source labels. Easier to share with non-technical stakeholders.
Text Diff vs Compare Two Lists
These two tools solve related but different problems. Use Text Diff when order and position matter: comparing two versions of a document, a configuration file, a script, or a block of prose. The diff tells you which lines changed and where.
Use Compare Two Lists when order doesn't matter and you're working with data: email addresses, product IDs, names, keywords. That tool does set operations (what's only in A, only in B, in both, or in either) without caring about line position.
A useful rule of thumb: if you'd be comfortable sorting either input without changing your question, use Compare Two Lists. If sorting would destroy the meaning, use Text Diff.
Comparing data lists instead?
Compare Two Lists finds what's only in A, only in B, shared, or combined.