โ†•๏ธ Sort Tool

Line Sorter

Sort lines alphabetically, reverse, shuffle randomly, or by length. Remove duplicates, trim whitespace โ€” instant side-by-side preview.

Lines in: 0
Lines out: 0
Duplicates: 0
Blank lines: 0
Input 0 lines
Sorted Output 0 lines

How does the line sorter work?

Paste any list โ€” one item per line โ€” and choose a sort mode. The tool sorts entirely in your browser using JavaScript's built-in localeCompare for alphabetical modes and Fisher-Yates for random shuffle. Everything runs instantly with no data sent to a server.

Natural number sort understands that "Item 2" comes before "Item 10", unlike a plain alphabetical sort that would put "10" before "2". It is useful for numbered lists, file names, and versioned items.

๐Ÿ“‹ Keyword lists

Sort exported keyword lists from SEO tools alphabetically before importing to a spreadsheet or campaign.

๐Ÿ“ง Email lists

Sort and deduplicate contact lists, subscriber exports, or CSV columns before processing or uploading.

๐Ÿ—‚๏ธ File names

Sort file name lists with natural number order so "file2.txt" correctly precedes "file10.txt".

๐ŸŽฒ Random order

Shuffle items for raffles, random assignment, A/B test order, or randomizing quiz question sequences.

Frequently asked questions

Paste your list, select "A to Z" mode and click Sort Lines. Lines are sorted in ascending alphabetical order using locale-aware comparison that correctly handles accented characters.
Yes โ€” select "Z to A" mode to reverse-sort all lines in descending alphabetical order. "Reverse" mode flips the existing line order without sorting alphabetically.
Yes โ€” select "Random Shuffle" mode. The tool uses the Fisher-Yates shuffle algorithm which gives a perfectly uniform random distribution. Click Sort again to re-shuffle.
Yes. Enable "Remove duplicates" and duplicates are removed before sorting. The stats bar shows how many duplicate lines were removed.
By default sorting is case-insensitive, so "Apple" and "apple" sort together. Enable "Case-sensitive sort" to treat uppercase and lowercase letters as distinct characters for ordering.
๐Ÿ”— Related tools