1. All tools
  2. Sort & dedupe lines

How do I sort a list and remove duplicate lines?

Paste a list with one item per line and choose an order — A to Z, Z to A, by number, by length, reversed or shuffled. The page can also remove duplicates (optionally ignoring case), drop empty lines, trim spaces and add text before or after each line, and it tells you how many duplicates it removed.

Runs entirely in your browser · nothing is sent · no account

  1. Paste your list, one item per line.
  2. Choose the order and clean-up options.
  3. Copy the result.

What this page can do

  • Sort A–Z, Z–A, by number or by length
  • Natural order: item 2 comes before item 10
  • Remove duplicates, optionally ignoring case
  • Trim spaces and remove empty lines
  • Random shuffle with a secure random generator
  • Add a prefix or suffix to every line

When to use this page

  • Cleaning up a list of emails, keywords or product codes.
  • Sorting names or tags for a document.
  • Picking a random order for a draw or a presentation line-up.

When to use something else

  • The data has several columns — use a spreadsheet or the CSV ⇄ JSON tool.
  • You need to sort a file of hundreds of megabytes — use the sort command.
  • You need to compare two lists — use Text diff.

How it compares with other options

Spreadsheets, text editors such as VS Code and Sublime Text, and the sort and uniq commands do the same work. This page combines the common steps in one place and sorts with your browser’s language-aware collation, so accented letters and numbers inside text are ordered the way people expect.

Where your data goes

Nowhere. Everything is computed by your own browser. Nothing you paste is sent to a server, logged or stored — close the tab and it is gone. You can check it yourself: open your browser’s network panel — the page still loads its own code and any ads, but no request carries what you typed.

Questions about this tool

What is natural order?

Natural order compares numbers inside text by their value, so “file 2” comes before “file 10”. Plain alphabetical order compares character by character, which puts “file 10” first because 1 comes before 2.

How does number sorting work?

Each line is ordered by the first number it contains, such as 42 in “Item 42” or −3.5 in “−3.5 °C”. Lines without a number are placed at the end, in alphabetical order.

Which copy of a duplicate is kept?

The first one. Removing duplicates happens before sorting, so with “Keep original order” the list keeps its order and only the later repeats are removed.

Is the shuffle really random?

Yes. It uses the Fisher–Yates method with your browser’s cryptographically secure random generator, so every order is equally likely.

Other tools you may need