Home › Toolkit › Text & Data › Sort Lines A–Z

↕️ Sort Lines A–Z

Six sort orders cover real lists: A–Z, Z–A, shortest or longest first, and numeric ascending or descending. Natural sort keeps numbered items in human order instead of dictionary order.

About this tool

Sorting sounds like the simplest job in computing until the list is real: names with mixed capitals, files numbered episode2 and episode10, prices written as text. Naive dictionary sort puts episode10 before episode2 and files every capitalised name before the lowercase ones. This sorter uses natural, case-insensitive ordering by default — numbers inside lines compare by value, letters compare as a reader expects — so the output is the order a careful human would produce, in a fraction of a second.

The other orders earn their place too. Length sorting surfaces your longest tags or titles at a glance (useful when a platform truncates), and numeric sorting rescues the classic spreadsheet failure where 100 sorts below 20 because the column was text. Sorting happens locally, the blank-line cleanup is optional, and the result replaces nothing until you copy it — your original paste stays in the box above until you decide.

How to use it

  1. Paste the list, one entry per line.
  2. Choose the order: alphabetical for names, numeric for values, length for spotting outliers.
  3. Press Sort and copy the ordered list.

Good to know

  • Dedupe before or after sorting — sorted duplicates sit next to each other, which makes them easy to spot either way.
  • Numeric sort reads the first number in each line, so 'Size 42 shoes' sorts by 42; lines without numbers group at the end.
  • For episode or chapter lists, natural A–Z is the fix for the famous 1, 10, 11, 2 ordering problem.

Frequently asked questions

Why does A–Z here differ from my spreadsheet's sort?

Spreadsheets often sort by raw character codes, where capitals precede lowercase and numbers compare as text. This sorter compares the way people read: case-insensitively, with numbers by value.

Can it sort by a number at the end of each line?

Numeric mode reads the first number in the line. If your numbers sit at the end, the A–Z natural order often still groups them sensibly — try it first.

Are duplicate lines removed?

No — sorting only reorders. Use Remove Duplicate Lines first if the list needs cleaning.

More Text & Data tools

Making videos too? Try our YouTube Title Generator, or browse the full Toolkit and the free YouTube tools.