Sort Lines

Sort text lines ascending, descending, naturally, or by length with private browser processing.

0 lines · 0 characters

All processing happens locally in your browser.

How to use Sort Lines

  1. 1

    Paste your list — one item per line. Works great with CSV columns, city names, log entries, or any line-separated data.

  2. 2

    Pick a sort mode: A–Z alphabetical, Z–A reverse, Shortest to Longest, or Natural order (best for numbered lists like "file2", "file10").

  3. 3

    Optionally remove duplicate lines, then copy the sorted result or download it as a .txt file.

Why use this tool?

Natural Sort for Numbered Lists

Unlike plain alphabetical sort, Natural Sort puts "chapter2" before "chapter10" — exactly what you expect when sorting numbered filenames, versions, or log entries.

Deduplicate in One Step

Sort and remove duplicate entries simultaneously. Perfect for cleaning up email lists, tag clouds, or config files with redundant entries.

No Size Limits, No Upload

Paste thousands of lines — the sorter processes everything locally in your browser tab without sending a single byte to a server.

Frequently asked questions

Why does alphabetical sort put "item10" before "item2"?

Because alphabetical sort compares characters one by one, and "1" comes before "2". Switch to Natural Sort to get the human-expected order: item1, item2, item10.

Can I sort a list of numbers (not text)?

Use Natural Sort to rank numbers correctly. For purely numeric sorting, paste your numbers one per line and choose Natural Sort — it handles integers and decimals.

Can I sort lines and remove blank lines at the same time?

Yes. Enable the "Remove blank lines" option before processing to strip empty lines from your output in the same pass.

Related tools

Everyday Utilities