Text Sorter
Sort lines A–Z, Z–A, numerically, naturally or by length — or reverse and shuffle them.
Text Sorter
A to Z: Alphabetical, ascending (language-aware).
- Input lines
- 0
- Output lines
- 0
- Empty lines
- 0
- Duplicates removed
- —
Your data is processed locally in your browser and is not uploaded to OZVILO servers.
How to use the Text Sorter
- 1Paste the lines you want to sort.
- 2Pick a sort order: alphabetical, numeric, natural, by length, reverse or shuffle.
- 3Adjust options such as case sensitivity, trimming, empty lines and duplicate removal.
- 4Copy or download the sorted lines.
Examples
Natural sort
- Input
- item10 item2 item1
- Result
- item1 item2 item10
Numeric sort
- Input
- 10 9 -3 2.5
- Result
- -3 2.5 9 10
Text Sorter features
- Language-aware alphabetical sorting (A–Z and Z–A) that keeps accented letters with their base letters
- True numeric sorting with decimals, negatives and thousands separators
- Natural sorting for mixed text and numbers, and sorting by length
- Reverse the order or shuffle randomly with an unbiased Fisher–Yates shuffle
- Options for case, trimming, empty lines, duplicate removal and reversing the result
Frequently asked questions
What's the difference between alphabetical and natural sort?
Alphabetical sort compares digits as characters, so “item10” comes before “item2”. Natural sort reads numbers as numbers, so “item2” comes first.
How does numeric sort handle lines without numbers?
It sorts by the first number in each line. Lines without a number are placed after the numbered lines, in their original order.
Is the shuffle truly random?
It uses the Fisher–Yates algorithm with your browser's cryptographic random number generator, so every order is equally likely.
Are equal lines kept in their original order?
Yes. Sorting is stable: lines that compare as equal stay in the order they were in.
Related tools
- Available
Remove Duplicate Lines
Delete repeated lines from a list — keep the first or last copy, or drop every repeated line.
Text ToolsOpen tool - Available
Remove Extra Spaces
Clean up duplicate spaces, tabs and blank lines in one click.
Text ToolsOpen tool - Available
Case Converter
Switch text between UPPERCASE, lowercase, Title Case, Sentence case and more.
Text ToolsOpen tool - Available
Text Diff Checker
Compare two texts line by line, word by word or character by character, with highlighted changes.
Text ToolsOpen tool