Sort Lines
Sort a list alphabetically, by number or by line length, reverse it, or shuffle it into random order. The result updates as you change the options.
Output
🔒 Runs in your browser. Your data is never uploaded.
How to use
- Paste your list, one item per line.
- Choose the order.
- Copy the sorted list.
Alphabetical is not numeric
Alphabetical order compares text character by character, so “10” comes before “2”. Choose a numeric order for anything with quantities, prices or IDs: lines are ordered by the first number they contain, and lines without a number go to the end.
Frequently asked questions
- How are accented and non-English letters sorted?
- With your browser's locale-aware comparison, so é sorts next to e rather than after z, as a dictionary would order them.
- Is the shuffle really random?
- It is a Fisher–Yates shuffle driven by your browser's cryptographic random source, so every ordering is equally likely. It is suitable for drawing names.
- What happens to identical lines?
- They stay next to each other and are all kept. Use Remove Duplicate Lines first if you want each line only once.
Related tools
- Remove Duplicate LinesRemove duplicate lines from a list while keeping the original order.
- Text DiffCompare two texts line by line and see what was added and removed.
- Case ConverterConvert text between UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case and kebab-case instantly.
- Find and ReplaceFind and replace text online, with optional regular expressions, case matching and whole-word matching.