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.

Compare Two Lists →

Frequently Asked Questions

How do I compare two blocks of text online?
Paste both texts into the Text Diff tool. Additions appear highlighted in green, removals in red, and unchanged lines in the default color. The comparison is instant and runs entirely in your browser.
What is the difference between Text Diff and Compare Two Lists?
Text Diff is for comparing documents or paragraphs where position and order matter. It shows you exactly which lines changed and where. Compare Two Lists is for set operations on unordered data: what items are only in List A, only in List B, in both, or in either. Use Text Diff for documents, configuration files, and code snippets. Use Compare Two Lists for names, IDs, emails, and other data that doesn't depend on order.
Can I ignore whitespace when comparing text?
Yes. Enable the Ignore Whitespace option and the diff will treat lines as equal if they differ only in leading, trailing, or internal spacing. Useful when comparing code that has been reformatted or text that came from different editors.
Can I ignore case when comparing text?
Yes. Enable Ignore Case and lines that differ only in capitalisation are treated as identical. Useful for comparing text from different sources that may have applied different capitalisation rules.
How do I download the diff result?
The Text Diff tool has two download buttons. The Diff button downloads a standard unified diff file (the format used by git and most code review tools). The Summary button downloads a readable version with sections for Updated, Removed, and Added lines.
What do the colors mean in the diff?
Green lines were added (present in Text B but not Text A). Red lines were removed (present in Text A but not Text B). Unchanged lines appear in the default text color. The line numbers shown are from their respective source texts.
Can I compare text side by side?
Yes. On desktop the diff defaults to side-by-side view with Text A on the left and Text B on the right. You can also switch to unified view, which shows both texts in a single column with changes interleaved. On mobile the tool defaults to unified view.
Is this the same as git diff?
Same concept, similar output. The diff algorithm produces unified diff format, which is what git uses internally. The visual display is friendlier than raw git output, but if you download the Diff file you get standard unified diff that any diff tool can read.

Share this tool

Featured on ToolDirs
© 2026 ListDiff

Free online list and text processing tools.