Sort Text Lines
Put any list in order: names, keywords, URLs, file names or numbers. Natural sorting puts "item2" before "item10", and you can also shuffle, reverse or sort by length.
Free · No sign-up · Files stay on your device
How to use Sort Text Lines
- 1Paste your list, one item per line.
- 2Choose how to sort and any options.
- 3Copy the sorted list.
Features
- A–Z and Z–A natural sorting
- Sort by line length
- Reverse order and random shuffle
- Optional case-insensitive sorting
- Remove duplicates and blank lines
Natural vs. plain alphabetical sorting
Plain alphabetical sorting compares character by character, so "item10" comes before "item2". Natural sorting reads numbers as numbers, giving item1, item2, item10, which is usually what people expect.
Frequently asked questions
Does it handle accented letters?
Yes. Sorting follows language rules, so "é" sorts next to "e".
How random is the shuffle?
It uses an unbiased Fisher–Yates shuffle with the browser's secure random number generator.
Can I sort numbers?
Yes. Natural sorting orders numbers by value, including negative numbers at the start of a line.
Related tools
Remove Duplicate LinesRemove duplicate lines from text or lists online for free. Options to ignore case, trim spaces, remove empty lines and sort the result.Find and ReplaceFind and replace words or phrases in any text online. Match case, whole words only, or use regular expressions. See how many replacements were made.Text Case ConverterConvert text to UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case or kebab-case online for free. Paste, click, copy.