Sort Lines

Put any list in order: alphabetical, natural (so item 2 comes before item 10), by length, numeric, reversed or randomly shuffled.

🔒 Runs in your browser. Nothing you enter is uploaded.

How to use the Sort Lines

  1. Paste your lines
  2. Pick a sort order and any options
  3. Copy the sorted list

About this tool

Plain alphabetical sorting puts “item10” before “item2”, because it compares one character at a time. Natural sort reads the numbers inside the text, so it orders file names and version numbers the way people expect. Sorting uses your browser’s language-aware collation, so accented letters sort next to their base letters instead of at the end.

Shuffle uses the Fisher–Yates algorithm, so every order is equally likely. That makes it handy for randomizing a quiz or a playlist.

Frequently asked questions

What is natural sort?

Natural sort compares the numbers inside text by their value, not digit by digit. You get “Chapter 2, Chapter 10” instead of “Chapter 10, Chapter 2”.

Is the sort case-sensitive?

By default, uppercase and lowercase versions of the same word are kept apart. Turn on “Ignore case” to sort them together.

How does numeric sort handle text?

Numeric sort reads the number at the start of each line. Lines that do not start with a number are treated as 0.

Related tools

Updated · Built and maintained by the UtilityBright team · About our tools · Report a problem