List Union Tool

Combine two line-separated lists and remove exact duplicates while preserving first-seen order.

Keeps each exact entry once: first-list order, then previously unseen second-list entries.

Processing stays in this browser. Each input supports 100,000 UTF-16 code units and 10,000 entries.

List Union: work with two lists

Combine two line-separated lists and remove exact duplicates while preserving first-seen order. Paste one entry per line into List A and List B, then select Process lists. The source inputs remain available for inspection. Load example (replaces both lists) replaces both inputs, so preserve any source you need before using it.

Work through the example

The result is apple, pear and plum, one per line. Repeated apple within list A and pear across both lists appear only once.

Matching and ordering

Union retains the first occurrence across list A followed by list B. Matching is case-sensitive and includes all whitespace. Empty strings, spaces and differently normalized Unicode sequences can be distinct entries. One empty input is allowed; the other list is still deduplicated.

Use union to combine allowlists or labels when exact equality is appropriate. It does not sort results, merge record fields or choose an authoritative spelling.

Empty lines and text preservation

An empty input contains zero entries. An explicit empty line is an entry; a final line terminator does not add another entry. For example, two line terminators contain two empty entries. No trimming or case conversion occurs. CRLF, CR and LF separate entries, but browser textareas can normalize line endings before processing. This is a line-based workflow, not a parser for CSV fields containing embedded newlines.

Inspect and save the output

The result is plain text with LF separators and no final terminator added. One retained empty entry and zero entries both appear as an empty text result; use the reported count to distinguish them. A zero-byte TXT download is still available.

Input is limited to 100,000 UTF-16 code units and 10,000 entries per side. Both completely empty inputs produce an error. Unpaired UTF-16 surrogates are rejected instead of changing them during UTF-8 export. Changing either input clears previous output and its download. Processing is local; a reload discards entered text. Review the result before using it to replace source data.

Use List Difference Tool for entries present in A but absent from B. Use List Intersection Tool when your task is finding common entries rather than positional pairing.