Remove Duplicate Lines, Sort and Edit Lists

Remove duplicate lines, sort a list alphabetically or by number, reverse, shuffle, find and replace, or add text to every line. Free, in your browser.

Runs in your browser. Your files are never uploaded. How it works

Line Tools works on lists: email addresses, keywords, product codes, file names, log lines. Paste the list, then remove duplicates, sort it, reverse or shuffle it, find and replace across all lines, or add text before and after each line, for example quotes and commas to turn a list into code.

100,000 lines

I pasted 100,000 email addresses, 30,000 of them repeats with different capital letters. With Ignore upper/lower case ticked, Remove duplicates left 70,000 in 0.16 s; Sort A → Z on the full list took 0.75 s (Chrome, Core i5-13500H laptop).

A short list of chapter titles after removing duplicates and sorting, with Chapter 2 before Chapter 10
A small list: duplicates that differed only in case are gone, and Chapter 2 comes before Chapter 10.

Every step can be undone, and the options at the top apply to all of them.

To count words and characters instead, use the Word Counter; to compare two lists, Text Compare.

Frequently asked questions

Which copy of a duplicate is kept?

The first one, and the order of the list stays as it was. Tick Ignore upper/lower case to treat Apple and apple as the same line.

Does sorting handle numbers correctly?

Yes. A → Z sorts item2 before item10, as people expect. Sort by number orders lines by the first number in each, for prices or scores.

How do I see which lines are repeated?

Press Show only duplicates. Each repeated line appears once with how many times it occurs.

Can I use regular expressions?

Yes. Tick Regular expression in Find and replace. Use $1 for groups and \n for a new line in the replacement.

Is there a limit?

Lists of several hundred thousand lines work. The text stays in your browser.

More ways to use Line Tools

Related tools