How-To Guides

How to Compare Two Text Versions Line by Line

Compare two versions of any text line by line: run a free online diff and learn to read additions, deletions, and modified lines with confidence.

Two versions of the same text sit side by side, and somewhere between them hides an edit: a changed price in a contract, a deleted line in a config file, a rewritten sentence in a draft. Finding it by eye means reading every line twice and trusting yourself not to blink at the wrong moment. A text comparison — often called a diff — does that scanning for you. It lines the two versions up, works through them line by line, and tells you exactly which lines were added, which were removed, and which stayed the same.

This guide explains what a line-by-line text comparison shows, how to run one with FBSubNet's free Line-by-Line Text Diff tool, and how to read the result so you can spot every change with confidence. Everything happens in your browser — no terminal commands, no sign-up, and no files uploaded anywhere.

What a text comparison actually shows

A comparison tool takes two inputs: the original text and the revised text. It then walks through both and matches up lines that are identical in both versions. Whatever is left over is a change, reported in one of three ways:

  • Unchanged lines appear in both versions exactly as they are. They are the anchors the comparison is built around.
  • Added lines exist only in the revised version. Something was inserted.
  • Removed lines exist only in the original version. Something was deleted.

In FBSubNet's Line-by-Line Text Diff, the result uses a simple plain-text convention borrowed from the classic Unix diff output:

  • Unchanged lines start with two leading spaces.
  • Added lines start with a +.
  • Removed lines start with a -.

There is one thing a comparison does not tell you: which version is correct. It shows what changed, not whether the change was a good idea. A diff that flags a deleted line cannot tell you whether the deletion was an accident or an intentional edit. That judgment stays with you — the tool just makes sure you never miss a change in the first place.

Compare two versions step by step

Here is the full workflow, using a concrete example you can follow along with. Imagine a small FAQ page that was revised overnight. This is the original version:

What are your opening hours?
We are open Monday to Friday, 9am to 5pm.
Do you offer refunds?
Refunds are available within 30 days of purchase.
Is there a phone number?
Call us on 555-0142 between 9am and 5pm.

And this is the revised version that landed in your inbox this morning:

What are your opening hours?
We are open Monday to Saturday, 9am to 6pm.
Do you offer refunds?
Refunds are available within 30 days of purchase.
Do you ship internationally?
Yes, we ship to over 40 countries.

There are three edits hiding in there: one modified line, one deleted line, and one added line. Try to spot them before reading on.

Step 1: Open the comparison tool

Open FBSubNet's Line-by-Line Text Diff. You will see two text boxes: Original text and Revised text. The tool supports up to 180 lines on each side, which comfortably covers short documents, lists, and snippets.

Step 2: Paste the original version

Paste the earlier version — the one you are treating as the baseline — into the Original text box. Order matters: if you swap the two boxes, every addition will be reported as a removal and vice versa. Get into the habit of reading the boxes left to right, old first, new second.

Step 3: Paste the revised version

Paste the newer version into the Revised text box. If your text lives in files rather than on screen, open each file, select all, copy, and paste the contents — the comparison works on the text itself, so any file you can open as text (a document, a config file, a snippet of code) can be compared this way.

Step 4: Run the comparison and read the result

Select Run tool. The result for our FAQ example looks like this:

  What are your opening hours?
- We are open Monday to Friday, 9am to 5pm.
+ We are open Monday to Saturday, 9am to 6pm.
  Do you offer refunds?
  Refunds are available within 30 days of purchase.
- Is there a phone number?
- Call us on 555-0142 between 9am and 5pm.
+ Do you ship internationally?
+ Yes, we ship to over 40 countries.

Every edit is now visible at a glance, and the output preserves the original line order, so you can read it top to bottom like a document.

How to interpret additions, deletions, and modified lines

Reading a diff result is a small skill of its own. Here is how to interpret each kind of change in the output above.

Modified lines appear as a pair

When a line is edited rather than added or deleted outright, the tool reports it as a removal followed immediately by an addition:

- We are open Monday to Friday, 9am to 5pm.
+ We are open Monday to Saturday, 9am to 6pm.

This is the line-based comparison telling the truth in its own way: the old version of the line is gone and a new version of the line exists. In a modified pair, read the two lines against each other and look for the actual difference — here it is Friday → Saturday and 5pm → 6pm. Modified pairs are the most common kind of change in prose, and they are also the easiest to misread, because a quick glance can make a heavily edited line look "mostly the same". Slow down on these.

Pure additions and deletions come in blocks

A line that exists only in the revised version shows up as a lone + line:

+ Do you ship internationally?
+ Yes, we ship to over 40 countries.

A line that exists only in the original shows up as a lone - line:

- Is there a phone number?
- Call us on 555-0142 between 9am and 5pm.

Contiguous added or removed lines cluster together into blocks, which is a useful visual cue: a block of + lines is new content, a block of - lines is content that disappeared. In our example, the phone-number FAQ was replaced by a shipping FAQ — a block of two removed lines followed by a block of two added lines.

Unchanged lines are your map

The unchanged lines — the ones starting with two spaces — are not filler. They are the landmarks that keep you oriented. When a document is 100 lines long and only 6 changed, the unchanged lines tell you where in the document each change happened. Skim the result by scanning for the + and - markers, then use the surrounding unchanged lines to understand the context of each change.

Where comparing two text versions comes in handy

The worked example above is small, but the technique scales to anything you can paste as lines of text:

  • Reviewing revised drafts. A colleague sends back "just a few tweaks" to your article. Paste both versions and see exactly what moved before you approve it.
  • Checking configuration files. A server stops behaving after an edit. Comparing yesterday's config against today's shows which line changed — far faster than re-reading the whole file.
  • Auditing lists and data. Two versions of a mailing list, a price list, or a set of IDs: the comparison shows which entries were added and which dropped out.
  • Proofreading contracts and policies. When a counterparty returns a redlined document, a quick diff of the plain text confirms that the only changes are the ones you agreed to.
  • Learning from edits. Writers improve by studying what their editors changed. Comparing your draft with the edited version turns every correction into a lesson.

In each case, the same discipline applies: pick the earlier version as the original, paste the newer version as the revision, and review every flagged line before acting on the document.

Limitations to keep in mind

A line-based comparison is simple and fast, but it has a few edges worth knowing. First, whitespace counts: two lines are "the same" only if they match character for character, so a trailing space or an extra blank line turns an identical line into a change. If your result is full of tiny formatting changes you do not care about, clean up both versions first — FBSubNet's guide to removing extra spaces from copied text covers exactly this — then compare again.

Second, the comparison preserves line order and assumes both versions are in the same order. If lines were reordered — say, two FAQ items swapped places — the tool reports the moved lines as deletions and additions rather than as "moved", which can make a simple reorder look like a big edit. If a section was reorganized, compare it section by section instead.

Finally, there is a size limit: the Line-by-Line Text Diff tool handles up to 180 lines per side. That comfortably covers FAQ pages, config snippets, lists, and short drafts. For much longer documents, split the text into sections and compare them in the same order.

Troubleshooting a confusing result

Most of the time the result is exactly what you expect. When it is not, one of these is usually the cause.

Everything is flagged as changed. The two versions probably differ in line endings or invisible characters — for instance, one was saved on Windows and the other on a Mac. Normalize both versions (same editor, same line endings) and run the comparison again.

Additions and removals look backwards. You pasted the newer version into the Original box and the older version into the Revised box. Swap them: the original goes first, the revision goes second.

A change you know about does not appear. Check that the line is genuinely different character for character — including capitalization, punctuation, and trailing spaces. If both versions really do contain the same line, it is correctly reported as unchanged, and the difference you remember may be elsewhere (or in your memory, not the text).

The result is hard to scan. Long unchanged stretches push the changes far apart. Trim both versions down to the section you actually care about — the tool's 180-line limit rewards focused comparisons anyway.

Frequently asked questions

Do I need to install anything to compare two text files?

No. For the comparison described in this guide, you only need a browser. Open FBSubNet's Line-by-Line Text Diff, paste the two versions and run the tool. Your text is processed locally in your browser and is not uploaded to any server.

Can I compare files, not just pasted text?

Yes. Open each file in any text editor, select all, copy, and paste the contents into the two boxes. This works for any file you can open as readable text: documents saved as plain text, configuration files, CSV exports, or source code.

How is this different from the diff command?

It is the same idea with a friendlier front end. The Unix diff command compares two files in a terminal and reports changes in a similar format. The online tool applies the same line-by-line logic to text you paste, so you get the result without touching a terminal. For scripted or very large comparisons, the command line still wins; for a quick check, the browser tool is faster.

Will the tool tell me which version is better?

No — and no comparison tool can. A diff reports what changed. Deciding whether the change is correct, complete, or an improvement is a human judgment, made by reading the flagged lines in context.

Try it on your own text

The next time two versions of a document cross your desk, resist the urge to read them both end to end. Paste the original and the revision into FBSubNet's free Line-by-Line Text Diff, run the comparison, and review each flagged line in order. You will find the edits in seconds — the modified line, the deleted line, the added line — instead of hoping your eyes catch them on the second read-through.