Skip to content
QuicklyTools

Sort Lines

Sort lines alphabetically, naturally (file2 before file10), numerically, by length, in reverse or randomly.

Runs in your browser
Loading tool…

About the Sort Lines

Organize lists of names, keywords, file names or numbers. Natural sort orders “file2” before “file10” the way humans expect; numeric sort uses the first number on each line; and shuffle uses a cryptographically secure random generator for fair randomization.

How to use it

  1. Paste one item per line.
  2. Choose the sort order and case sensitivity.
  3. Copy the sorted list.

Good to know

  • Alphabetical sorting uses locale-aware comparison, so accented letters sort next to their base letters.
  • Empty lines are sorted too; remove them first if you don't want them at the top.

Frequently asked questions

How do I sort numbers correctly?

Choose Numeric or Natural. Plain A→Z sorts “10” before “9” because it compares text.

Is the shuffle truly random?

It uses crypto.getRandomValues with a Fisher–Yates shuffle, so every order is equally likely.

More text tools →