Skip to content
UniKit

Text union

Merge two text lists into a de-duplicated union: one item per line, blank and padded lines ignored, optional case sensitivity, first-seen order kept, with a duplicate count — all local.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Blank lines and surrounding whitespace are ignored; duplicates keep their first occurrence.

Union

Left list first, then the new items from the right list; duplicates appear once. Everything runs locally.

Fill in both lists to see the union

What this tool does

  • Merge two batches of contacts into a single de-duplicated list
  • Combine two exported ID or keyword lists, keeping only the first occurrence
  • Take the union of an old and a new word list before de-duplicating or sorting it further

Example

Input

苹果
香蕉
苹果

Output

苹果
香蕉
橘子

The second list in this example is "香蕉\n橘子": the left list comes first and only 橘子 is new, while the repeated 苹果 is dropped.

Frequently asked questions

How is the output order decided?

The first list is written first (de-duplicated, in its original order), then the items of the second list that have not appeared yet, in their order. So A=[1,2] and B=[2,3] give 1, 2, 3. The first occurrence of a duplicate wins; a later spelling never overwrites it.

How are blank lines and surrounding spaces handled?

Blank lines are ignored by default and leading/trailing spaces and tabs are trimmed, so " 苹果 " and "苹果" count as the same item. With "Ignore surrounding whitespace" switched off they become two different items, which suits lists whose indentation matters.

What does the case switch do?

Case sensitivity is on by default, so Apple and apple are two items. Switch it off and they compare as equal, keeping the spelling that appeared first (an earlier Apple is not replaced by apple).

Can I fill in only one list?

Yes. With one side empty the result is simply that side de-duplicated, and the other side shows 0 in the statistics. An error is only raised when both lists are empty (or contain blank lines only).

Is the list uploaded?

No. The merge happens in your browser, neither list leaves your machine, and you can copy the result.

Keywords:text uniontxt-unionoffline

Related tools