Text Toolsavailable

Remove Duplicate Lines

Keep one copy of each repeated line in a text list.

Input

Type or paste one item per line. Results update only in this browser.

OutputRead-only

Read-only, selectable output.

Options

Comparison affects duplicate matching only; retained lines keep their original text.

Keep occurrence

Duplicate statistics

Input lines
0
Output lines
0
Unique lines
0
Removed duplicates
0
Duplicate groups
0
Empty lines
0
Input characters
0
Output characters
0
Input UTF-8 size
0 B
Output UTF-8 size
0 B

What this tool does

Remove repeated lines while keeping the selected first or last occurrence. Processing happens live in this browser tab, and the original text of each retained line stays unchanged.

Comparison rules

Choose case-sensitive matching and whether spaces at the start or end should be ignored. Empty lines participate in matching by default; with surrounding-space trimming, whitespace-only lines count as empty. Sorting happens after duplicates are removed, using the same normalized comparison values.

How to use

  1. Paste or type one item per line.
  2. Choose comparison and retention options.
  3. Review the unique output, then copy or download it.

Privacy

Your text stays in your browser. Nothing you enter is uploaded or automatically saved.

Limitations

Comparison is line-based: similar but non-identical lines are not fuzzy-matched. Sorting changes the retained output order, and line endings are normalized to LF in the output.

Frequently asked questions

Does the tool preserve line order?

Yes, unless you choose sorting. First and last modes otherwise preserve the original order of retained lines.

Can it ignore uppercase and lowercase differences?

Yes. Turn off case-sensitive comparison to group different casing together while preserving the retained line's original casing.

Can it ignore spaces around a line?

Yes. Select Ignore surrounding spaces before comparison; this does not change the displayed retained text.

Can it keep the last duplicate instead of the first?

Yes. Choose Keep last; retained lines remain ordered by their final positions in the input.

How are empty lines handled?

By default one empty line is kept. Turn off empty-line matching to preserve every empty line.

Practical guide

When to use it

Use it to clean copied lists such as email domains, tags, URLs, or identifiers while keeping one representative of each repeated line.

Three steps

  1. Paste one list item per line.
  2. Choose whether matching should ignore case or surrounding whitespace.
  3. Review the retained lines, then copy or download the unique list.

Example and a common mistake

The entries Docs, docs, and docs can be treated as one item when case and whitespace are ignored.

Comparison options can merge values that look different but are meaningful in a case-sensitive system, such as file names.

Text

Available

Sort Lines

Arrange text lines alphabetically or in reverse order.

Text

Available

Line Number Tool

Add, remove, and format line numbers in copied text.