Line Set Compare

Compare two lists by whole-line membership. See lines only in A, only in B, and in both, without an ordered edit.

Last updated: October 6, 2026

Tool

This tool will load here.

What this tool does

This line set compare page takes two texts and treats each line as one member of a set. It lists the lines that appear only in A, the lines that appear only in B, and the lines that appear in both. The question is membership, not an ordered edit. Text Diff remains the page for an ordered line edit with context. This page does not show a hunk, a character change, or a moved block.

The boxes turn CR and CRLF into LF before Compare, so those three spellings of a line break are the same break. A line is the text between LF boundaries. A final LF creates a trailing empty line. With trim off, that empty line is a real member. With trim on, the page removes leading and trailing ASCII spaces and tabs from each line, and a line that becomes empty is discarded. A no-break space is not trimmed. Comparison is case-sensitive, so A and a are different lines. The lists are not sorted.

Order inside a result follows first-seen order. Only in A and In both follow the order of A. Only in B follows the order of B. A repeated line does not create a repeated row. The first copy is the member. Later copies on that side are ignored duplicates, and the count says how many were ignored. If A contains the same line three times and B contains it once, the line appears once in In both, and A reports two ignored copies.

An empty side is a valid empty set. Both sides empty is valid. The page does not raise an error only because a box is empty. Over the character cap or the line cap, the page clears every list and does not show a partial comparison.

Copy writes three labeled blocks: Only in A, Only in B, and In both. The counts stay on the page and are not part of the copy. A line is text. A line that looks like markup is not turned into HTML.

How to use

  1. Paste text A and text B. One line is one value.
  2. Leave the trim checkbox off for an exact compare, or turn it on to drop leading and trailing ASCII spaces and tabs.
  3. Choose Compare, or press Enter in the checkbox. Enter inside a text box does not compare. Copy writes the three lists. Clear empties both texts and the lists and leaves the trim checkbox as it is.

Nothing is sent off the page. The texts are not stored. A line is not parsed as code.

Example

Text A of a, then b, and text B of b, then c, produces only in A as a, only in B as c, and in both as b. Text A of b, then a, and text B of a, then b, produces in both as b then a, because In both follows A. Text A of A and text B of a produces an empty In both list, because the compare is case-sensitive.

Text A of a, a line break, a, and a final line break, against text B of a, has one unique a in both and one ignored duplicate on A, plus a trailing empty line only in A when trim is off. With trim on, the line space a space matches a. A line that is a followed by a no-break space still differs from a when trim is on. Both boxes empty produces zero unique lines and three empty lists.

Limits

  • 200,000 characters and 5,000 lines on each side. Over the cap, every list is cleared.
  • Exact membership after the optional ASCII trim. No fuzzy match and no sort.
  • Not an ordered diff, not a character diff, and not a JSON comparison.

The compare stays in the browser. A result names whole lines. It does not say which characters changed inside a line, and it does not merge the two texts.

On this page

Related Articles

Related guides

Related solutions

Related Tools

Need another tool ?

Open the free tools — no signup.

FAQs

newsletter signup

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Innovative Solutions For Modern Needs
Copyright © 2026 Yallasolve. all rights reserved.