Compare Two Texts for Differences: Text A vs Text B

Guide · August 31, 2026

Comparing two texts is one of the most common editing tasks there is. You have a first draft and an edited version, a published page and a proposed change, or a config file and its updated copy. You need to answer one question: what exactly changed between text A and text B?

This guide walks through a real example, shows you how to read the output, and explains the three comparison modes so you can pick the right one for the job. You can run every example here instantly in the free Text Compare tool.

Why compare two texts at all

Manually scanning two blocks of text line by line is slow and error prone, especially when the material is long or the edits are subtle. A diff tool does the scanning for you: it aligns the two versions and flags each place they diverge. This matters for reviewing colleagues' edits, checking that a change did not alter something you did not intend, verifying a copy matches a corrected original, and auditing configuration or documentation updates.

Step-by-step: compare text A and text B

  1. Open the Text Compare page. No sign-up is required.
  2. Paste text A (the original) into the left box.
  3. Paste text B (the modified version) into the right box.
  4. The differences appear as you type. Removed content is highlighted red; added content is highlighted green.
  5. Use the mode switch to compare at line, word, or character granularity.

Real example: a paragraph that changed

Suppose text A is the opening of a product description, and text B is the edited version sent back by a reviewer:

Text A (original)
Our tool helps teams spot differences in documents. It works in your browser. You do not need to install anything, and your files stay private because nothing is uploaded.
Text B (edited)
Our tool helps teams find differences in documents and code. It works entirely in your browser. You do not need to install anything, and your files stay private because nothing is ever uploaded to a server.

What the diff output shows

When you paste both into the tool, the word-level view highlights the following changes:

In line mode you get a coarser view: the tool shows that the whole paragraph line changed without splitting it further. In character mode you see down to the individual letters, which helps when two strings differ by one character. To understand when to use each mode, see Word, Line, and Character Diff Modes Explained.

Using the options for tricky comparisons

Two options make text comparison more precise in common situations:

For files, you can drag in a .txt, .docx, .xlsx, or .pdf document instead of pasting. The parser runs locally, so your file stays on your computer. Read more about why that matters in Compare Text Without Uploading to a Server.

Limits and when to use a desktop tool

Browser comparison handles everyday text, documents, and config files well. It has a practical size limit of around 200 KB of combined input to keep the page responsive. If you need to diff multi-megabyte log files, entire directory trees, or binary files, a desktop diff tool such as meld or WinMerge is a better fit. DiffLab is not a Git client and does not compare binary files.

Note: Comparison runs entirely in your browser. Your pasted text is never sent to a server. If you are on a shared computer, close the tab when you are done so the content does not linger.

Compare your texts now — free and private.

Open Text Compare