Shiklo Tools
PDF40
Image20
Calculators & Converters25
Text & Writing13
Developer26
Video14
Audio14
Document14
Data & Spreadsheet12
Web & SEO9
OCR & Scanning5
Archive & File12
Security & Privacy23
Health & Medical29
QR & Barcode5

Text Sorter

Sort lines alphabetically, naturally, by number, by length or at random, or reverse their order. Sort by a column, remove duplicates. Private.

Paste a list and put it in order in one click. The Text Sorter sorts lines alphabetically from A to Z or Z to A, in natural order so that item 2 comes before item 10, by the number in each line, by length, or in a random order for draws and quizzes. It can also simply reverse the order of the lines.

You can sort by the whole line or by one column of a CSV or tab-separated list, ignore upper and lower case, trim spaces, and remove empty or duplicate lines at the same time. Accented letters are sorted the way people expect in your language. The sorting happens live in your browser, so long lists and private data never leave your device.

How to use Text Sorter

  1. Paste your list (one item per line), open a text file, or click Sample.
  2. Choose how to sort: A–Z, Natural, Numbers, Length, Random or Reverse order.
  3. Pick Ascending or Descending, and a column if your lines have several fields.
  4. Copy the sorted list or download it as a .txt file.

Features

  • Alphabetical sorting that understands accents and your language.
  • Natural sort: file2 comes before file10.
  • Numeric sort by the first number in each line, including 1,250 and -7.5.
  • Sort by line length, shortest or longest first.
  • Fair random shuffle using your browser's secure random generator.
  • Reverse the order of lines without sorting.
  • Sort by column 1 to 4, split by comma, tab, semicolon, pipe or spaces.
  • Ignore case, trim spaces, remove empty and duplicate lines.
  • Live results; nothing is uploaded.

Sorting options explained

Each sort mode answers a different need. Ties are kept in their original order, so sorting is stable and predictable.

ModeHow lines are orderedExample (ascending)
A–ZAlphabetically, character by characterapple, Banana, cherry
NaturalAlphabetically, but numbers inside text by valueitem 1, item 2, item 10
NumbersBy the first number in the line; lines without one go last7 kg, 42 kg, 1,250 kg
LengthBy number of characters, then A–Zfig, kiwi, banana
RandomA fair shuffle; every order is equally likelyDifferent each time
Reverse orderLast line first, no sortingc, b, a from a, b, c

Alphabetical versus natural order

A plain alphabetical sort compares text character by character, so item 10 comes before item 2 because the character 1 comes before 2. That is how many simple tools and old file managers sort, and it often looks wrong. Natural order reads groups of digits as whole numbers, so item 2 comes before item 10, chapter 9 before chapter 11, and photo 100 after photo 99. Use Natural for file names, version lists and anything numbered.

Sorting by a column

If each line holds several values, such as name, city and age from a spreadsheet, choose the column to sort by and how the columns are separated: comma, tab, semicolon, pipe or spaces. The whole line moves, only the chosen column decides the order. Copying cells from Excel or Google Sheets gives tab-separated lines, so choose Tab for pasted spreadsheet data. For more complex CSV files with quoted values, convert them with CSV to JSON first.

Upper case, lower case and accents

With Ignore case on, Apple and apple are treated as the same word, so lists mix naturally. With it off, capital letters come before small ones when the words are otherwise equal. Accented letters such as é, ü or ñ sort next to their base letter instead of after z, following the rules of your browser's language. Ignore case also applies to Remove duplicates, so Apple and apple count as one line.

Random order for draws and quizzes

Random uses the Fisher–Yates shuffle with numbers from your browser's cryptographic random generator, so every possible order is equally likely and the result cannot be predicted. That makes it suitable for picking winners, shuffling quiz questions, creating random teams or deciding a running order. Click Shuffle again for a new order.

Frequently asked questions

Is the text sorter free and private?

Yes. It is free with no sign-up, and your list is sorted in your browser. Nothing is uploaded or stored.

How do I sort a list alphabetically?

Paste the list with one item per line and keep Sort on A–Z. Choose Descending for Z to A.

Why does 10 come before 2?

That is plain alphabetical sorting. Choose Natural to sort numbers inside text by value, or Numbers to sort lines by the number they contain.

Can I shuffle a list randomly?

Yes. Choose Random. The shuffle is fair and uses your browser's secure random generator; click Shuffle again for a new order.

Can it remove duplicates while sorting?

Yes. Turn on Remove duplicates. With Ignore case on, lines that differ only in capital letters count as duplicates.

How do I sort by the second column?

Set By to Column 2 and choose the separator, for example Tab for data copied from a spreadsheet or a comma for CSV.

How many lines can it sort?

Lists of 100,000 lines sort in a second or two on a typical computer; very large lists update after you stop typing. The limit is your device's memory.

Related tools