Sort lines
Alphabetical, natural, by length, without duplicates and numbered
No database: AIMRAN doesn't store your files, text or results
What is Sort lines?
This tool sorts any list you have in lines: names, emails, products, keywords or references. Paste it, choose the order and it's ready instantly.
It can also remove repeated items and empty lines, number the list or add something before and after each line, such as quotes or commas.
How to use it
- Paste your list, one item per line.
- Choose the order: A → Z, Z → A, Natural, by length, reversed or random.
- Turn on Remove duplicates, Remove empty lines or Trim spaces.
- Optionally number the lines or add a prefix and suffix.
- Copy or download the result.
Advantages
- Eight sort orders, including natural (1, 2, 10) and random.
- Correct alphabetical order with accented letters, following Spanish collation (ñ after n).
- Duplicate removal with or without ignoring case.
- Numbering in three formats and a prefix or suffix per line.
Use cases
- Sort a class roster or guest list alphabetically in one go.
- Remove duplicate email addresses from a subscriber list you merged from several spreadsheets.
- Shuffle the list of entrants for a giveaway or the order of student presentations at random.
- Add quotes and a comma to every line to turn a list of IDs into a code array or an SQL IN clause.
Technical details
Comparison uses Intl.Collator with the Spanish locale, so ñ comes after n and accented vowels sort together with unaccented ones. With Ignore case, base sensitivity is used, which also applies when detecting duplicates; without it, uppercase comes first. Natural order enables numeric comparison, so “file 2” comes before “file 10”. Random order uses a seeded shuffle that you can repeat with Shuffle again. Numbering supports the formats “1.”, “1)” and “1 -”. It shows how many lines go in and out, and how many duplicates and empty lines were removed.
Frequently asked questions
How do I sort a list alphabetically?
Paste the list with one item per line and choose A → Z. The result appears instantly.
How do I remove duplicate lines?
Turn on Remove duplicates. If you want “London” and “london” to count as the same, keep Ignore case on.
What is natural sort order?
It takes the value of numbers into account: it puts 2 before 10, instead of 10 before 2 as pure alphabetical order would.
Can I shuffle a list randomly?
Yes. Choose Random and click Shuffle again to get another order.
Related tools
- Clean text · Spaces, line breaks, emojis and HTML
- Text case converter · UPPERCASE, Title Case, camelCase, kebab-case…
- Find and replace · Several rules at once, with or without regular expressions
- Text compare · Side-by-side differences
- SQL formatter · Format or minify queries
- AI text detector · Estimate with suspicious sentences highlighted