Skip to main content

Sort Lines

Sort lines alphabetically, by length, or randomly in seconds.

Instant · Runs in your browser · No data sent

Processed locally in your browser.

About this tool

Sorting a list by hand makes no sense when you have more than a handful of items. This tool sorts lines of text alphabetically (A to Z or Z to A), by length, or randomly — instantly. Useful for keyword lists, name lists, URL lists, anything that benefits from a specific order.

How to use Sort Lines

  1. Paste your list — one item per line

  2. Choose your sort method: A–Z, Z–A, shortest to longest, longest to shortest, or random

  3. The list sorts instantly

  4. Copy the sorted list and use it in your spreadsheet, document, or wherever you need it

Frequently asked questions

Does it sort numbers correctly?
It sorts alphabetically by default, which means 10 comes before 2 in text sorting. If you need numerical sorting, use a spreadsheet tool which handles number sorting correctly.
Can I sort by length?
Yes. Sort by shortest to longest is useful for keyword lists when you want to see your shortest terms first. Longest to shortest helps when you want to trim long items first.
Does it remove duplicates too?
No, sorting and removing duplicates are separate operations. Use the Remove Duplicate Lines tool first, then sort the result here.

Related tools