Text Sorter: Sort Lines Online

Sort any list alphabetically, numerically, by length or randomly. Natural sorting puts “item 2” before “item 10”, and you can sort CSV data by any column, remove duplicates and keep a header row.

  • A–Z, numbers, length, random
  • Natural & column sorting
  • Handles accents correctly

How to use the Text Sorter tool

  1. Paste your listPut one item per line in the left box: names, words, numbers, URLs or rows of CSV data.
  2. Choose the sort orderAlphabetical, reverse, natural, numeric, by length, reversed or shuffled. The result updates instantly.
  3. Fine-tuneIgnore case, remove duplicates and empty lines, keep the first line as a header, or sort by a column.
  4. Copy or downloadCopy the sorted list or download it as a text file.

Features

  • Natural sortNumbers inside text are compared as numbers, so file2 comes before file10.
  • Language-awareAccented letters such as É and ñ are sorted where people expect them, not at the end.
  • Sort by columnSort comma, tab, semicolon or pipe separated data by column 1 to 4.
  • Random shuffleFair, cryptographically random shuffling for draws, quizzes and team picks.
  • Clean-up optionsTrim spaces, drop empty lines and remove duplicates while you sort.

Sorting options explained

OptionExample resultGood for
A → Zapple, Banana, cherryNames, glossaries, word lists
Naturalitem 1, item 2, item 10File names, chapters, versions
Numbers2, 15, 100, 1,250Prices, scores, IDs
Lengthfig, kiwi, bananaFinding the shortest or longest entries
RandomA different order each timeRaffles, quiz questions, presentation order

Why “natural” sorting matters

Computers normally compare text one character at a time, so “item 10” comes before “item 2”, because the character 1 comes before 2. That looks wrong to people. Natural sorting recognizes the numbers inside text and compares them by value, which is how file explorers and most people expect lists to be ordered.

Sorting numbers

Numeric sorting reads the first number on each line, including decimals, negative values and numbers with thousands separators such as 1,250. Lines without a number are placed at the end, so you can sort lists like “Product A – 19.99” by price.

Sorting CSV and table data

Pasted rows from a spreadsheet are usually separated by tabs; exported CSV files use commas. Choose “Sort by Column 2” and the right separator to order rows by, for example, a surname or a date column. Tick “First line is a header” so the column titles stay at the top.

Tips

  • Combine “Remove duplicates” with A → Z to turn a messy list into a clean, unique, alphabetical one.
  • Click “Use result as input” to apply several steps in a row, for example sort by length and then reverse.
  • Need to compare two sorted lists? Use the Text Diff Checker. To change capitalization first, try the Case Converter.

Frequently asked questions

How do I sort a list alphabetically?
Paste your list with one item per line and choose “A → Z”. The sorted list appears instantly and can be copied with one click.
Why does 10 come before 2 in other tools?
They compare text character by character. Choose “Natural” or “Numbers” here to sort numbers by their value.
Can I sort a CSV file by a column?
Yes. Choose the column and the separator (comma, tab, semicolon, space or pipe) and tick “First line is a header” if needed.
Is the random shuffle really random?
Yes. It uses your browser’s cryptographically secure random number generator with the Fisher–Yates algorithm.
Is my text uploaded?
No. Sorting happens in your browser and nothing is sent to a server.