Skip to main content
100% private — runs in your browser

Text Sorter

Sort lines alphabetically, numerically, by length or randomly.

Your lines

Sorted lines

0 lines

Sort options

How to use Text Sorter

  1. Paste your lines

    Enter one item per line in the editor.

  2. Select a sort mode

    Choose alphabetical, natural, numeric, by length or random, and adjust the options.

  3. Copy or download

    The sorted output updates immediately and can be copied or saved as a file.

Frequently asked questions

What is the difference between alphabetical and natural sort?

Alphabetical sort compares lines as plain text, so "Chapter 10" comes before "Chapter 2". Natural sort reads embedded numbers as numbers, so "Chapter 2" comes first.

Can I sort numbers correctly?

Yes. Numeric mode parses each line as a number, supports decimals and negative values, and sorts in true ascending order.

Is the random shuffle truly random?

It uses the browser cryptographic random number generator, which is appropriate for drawings and selection. The order is different on every run.

Does sorting ignore case?

You can choose. Case-insensitive mode groups capitals with lowercase; case-sensitive mode places uppercase entries before lowercase ones.

Can I reverse the sorted order?

Yes, there is a reverse toggle that works with every sort mode.

About Text Sorter

The Text Sorter organises a list of lines the way you need it. Sort alphabetically, by numeric value, by length, by modification-style natural order, or shuffle the list randomly, then copy or download the result.

Sorting modes explained

Alphabetical sorting compares lines as text and produces a predictable A–Z order. Natural sort treats embedded numbers as numbers, so "Chapter 2" comes before "Chapter 10" instead of after it — the behaviour you expect from a file browser or a document index. Numeric sorting requires every line to parse as a number and is ideal for measurements, counts and prices, with an option to treat negative values and decimals correctly. Length sorting puts the shortest lines first, which is useful when you are trying to spot outliers in a dataset. Random shuffling uses a cryptographically-seeded randomiser, which makes it useful for drawing names out of a hat or randomising a test order.

Reversed order and stability

Every mode can be reversed with a single toggle, so "newest first" is simply ascending order inverted. Sorting is stable, meaning that lines which compare equal keep their original relative order. Without stability, a list of names such as "Ana, Bob, Cid" sorted by length would appear to be shuffled between runs; with it, the order is deterministic and reproducible. Case sensitivity is optional as well, so "apple" and "Apple" can be grouped together without disturbing the ordering of the rest of the list.

Practical workflows

The most common use is tidying keyword lists, tag names or category slugs before importing them into a CMS. Another is taking a list of customer or product names and sorting them into a consistent, presentable order for a catalogue. Teachers use it to shuffle a class list before handing out groups. Developers use it to sort lines from a configuration file. Because the whole process runs locally, you can sort confidential data without any risk of it being transmitted.

Use Text Sorter on your site

This tool runs free and private in the browser. Paste it anywhere — blog posts, documentation, team wikis — and your visitors will use it without leaving your site. The embed includes a small "Made with The Tools Today" credit link.

Open the tool page →

Your privacy, your choice

We use cookies to understand how the site is used and to show relevant ads. Every tool on this site runs entirely in your browser, so the files and text you process are never uploaded. Read our privacy policy.