Skip to content
NMSnabbit.

Sort Text Lines Alphabetically

Sort lines alphabetically or by length, ascending or descending, with optional de-duplication.

Text Tools Runs in your browser

What does the line sorter do?

Got a jumbled list? Paste it in with one item per line and sort it A–Z, Z–A, shortest-first or longest-first. Optional switches ignore case, trim stray spaces and drop duplicate lines in the same pass, so “Apple” and “apple” can collapse into a single entry. A thousand-line keyword list sorts as fast as ten.

How to use the Sort Lines

  1. 1 Put one entry on each line of the input.
  2. 2 Select A–Z, Z–A, shortest first or longest first.
  3. 3 Flip on ignore case, trim or remove duplicates as needed.
  4. 4 Take the ordered list from the output panel.

What you can use it for

  • Alphabetising lists of names, words or keywords.
  • Cleaning up and ordering CSV or log lines.
  • Organising to-do lists or bibliographies.
  • Ordering items by length for layout testing.

Frequently asked questions

Can it remove duplicates while sorting?
Yes. With “remove duplicates” switched on, only the first copy of each repeated line survives into the sorted output, so sorting and cleaning happen together.
Does it sort case-sensitively?
Sorting is case-sensitive unless you enable “ignore case”. Without it, capital letters group before lowercase ones because of how character codes compare.
What is length sorting?
Instead of alphabetical order, lines are ranked by character count. Shortest-first is handy for spotting outliers; longest-first puts the bulkiest entries on top.

Related tools

More Text Tools

More tools like this:

All Text Tools