Text utilities

Sort Lines

Sort lines locally with ascending, descending, natural, case-insensitive, trim, and empty-line options.

Runs locally in your browser
Drop a text fileSorts lines locally. The file is not uploaded.
Input lines7
Sorted lines6
Empty lines removed1

How to use this tool

Paste text or drop a local text file into the tool.

Choose ascending or descending order, natural numeric sorting, case-insensitive sorting, trimming, and empty-line removal.

Copy the sorted output for keyword lists, URL lists, redirect maps, config snippets, or manual review.

Natural sort versus plain alphabetical sort

Plain alphabetical sorting can put `item 10` before `item 2` because it compares text character by character.

Natural numeric sort treats embedded numbers as numbers, so `item 2` comes before `item 10`.

Natural sort is useful for filenames, numbered lists, versions, product labels, and generated IDs.

When not to sort lines

Do not sort logs, stack traces, ordered instructions, poetry, code blocks, or CSV rows when line order carries meaning.

For deduplication workflows, remove duplicates first when you need a unique set, then sort the remaining lines.

For structured CSV or JSON, use a parser-aware tool when column relationships or object order matter.

Examples

Natural numeric order

Input
item 10
item 2
item 1
Output
item 1
item 2
item 10

Case-insensitive keyword sort

Input
Banana
apple
banana
Output
apple
Banana
banana

FAQ

What is natural sort?

Natural sort compares embedded numbers as numeric values, so `file 2` sorts before `file 10`.

Does this upload my text?

No. Sorting runs locally in your browser and text/file contents are not sent to Lumio.

Should I sort before or after removing duplicates?

Remove duplicates first when your goal is a unique list, then sort the result for easier scanning.

Can this safely sort CSV rows?

It can sort lines as text, but it does not parse CSV columns. Use caution when row order or headers matter.