Sort & Dedupe Lines

Sort, reverse, shuffle and remove duplicate lines.

Free tools that run in your browser. Nothing you type, open or create is uploaded to NerdBible or anyone else.

Natural order compares numbers inside the text by value, so item 2 comes before item 10. Shuffle uses your browser's cryptographic random number generator, so every order is equally likely.

How to use it

  1. Paste your list with one item per line.
  2. Choose an order and tick the clean-up options you want: remove duplicates, trim spaces, drop empty lines.
  3. Copy the result, or press Use as input to keep working on it.

Questions

What is natural sort?

Plain alphabetical sorting compares character by character, so 10 comes before 2. Natural sort reads the numbers as numbers, which is what people expect for file names, versions and numbered items.

How does case sensitive sorting work?

When it is off, Apple and apple sort together as if they were the same. When it is on, capital letters and small letters are treated as different and kept apart.

Which copy is kept when duplicates are removed?

The first time a line appears is kept and later copies are dropped, before sorting. With Ignore case ticked, Apple and apple count as the same line.

Is the shuffle really random?

Yes. It uses the Fisher-Yates method with numbers from the Web Crypto random generator, so it is fair enough for draws and giveaways.

About this tool

Sorting and cleaning a list

Paste any list with one item per line, such as names, email addresses, keywords or file names, and this tool puts it in order and tidies it up in one pass.

Ordering options

  • Alphabetical, A to Z or Z to A, with or without case sensitivity.
  • Natural order, which reads numbers inside text as numbers, so item 2 comes before item 10. This is what people expect for file names and versions.
  • By length, reverse the current order, or shuffle randomly.

Clean-up options

  • Remove duplicates: the first appearance of a line is kept and later copies are dropped. With Ignore case ticked, Apple and apple count as the same.
  • Trim spaces at the start and end of each line.
  • Drop empty lines.

Press Use as input to feed the result back in and keep working on it.

A fair shuffle

Shuffling uses the Fisher-Yates method with numbers from your browser's cryptographic random generator, so every order is equally likely. That makes it fair enough for picking the order of speakers or a giveaway draw.

Your list is processed in your browser and is not sent anywhere.

Related tools