Get started
HomeText & ContentSort Lines
Text & ContentRuns in your browser · files never uploaded

Sort Lines

Alphabetical / reverse / natural

4.6· 71 votes
Your file never leaves this browser. Everything runs on your device — no uploads, no server storage, no retention.How it works →
Input9 lines
Output9 lines
200
3
30
apple
banana
file-1.txt
file-10.txt
file-2.txt
Zebra

What is Sort Lines?

Sort a list of lines alphabetically, numerically (natural sort — so "file-10" comes after "file-2"), by length, reversed, or shuffled randomly. Options include ignore-case and drop-empty-lines. Useful for tidying CSV headers, ordering a bibliography, randomising quiz items, or preparing input for diff tools.

How do I use Sort Lines?

  1. Paste lines into the input panel.
  2. Choose a sort mode — alphabetical, natural, length, reverse, or shuffle.
  3. Toggle descending / ignore case / drop empties as needed.
  4. Copy or download the sorted output.

When should I use Sort Lines?

Sort Lines is for line-based ordering. To remove duplicates rather than just sort, use Dedup Lines — or chain them (sort first, then dedup) for a clean, sorted, unique list.

Frequently asked
Does the sort handle numbers correctly?

Pick "Natural sort" to get 1, 2, 10 instead of 1, 10, 2. Default alphabetic sort treats numbers as strings.

Can I sort by length or reverse order?

Yes. Options include alphabetic, reverse alphabetic, length (short to long), length (long to short), natural, and random shuffle.

Is the sort case-sensitive?

By default, yes — uppercase letters come before lowercase. Toggle "Ignore case" to sort insensitively.

Is my file uploaded anywhere?

No. Everything runs in your browser. Your files never leave your device, and there is no server component for this tool.

Related in Text & Content
Text Compare
JSON Beautifier
JSON Minifier
XML Formatter
XML to JSON
YAML Formatter
Case Converter
Word Counter