Line Sorter
Sort text lines alphabetically, numerically, by length, naturally, or randomly. Remove duplicates, trim whitespace, and filter blank lines.
Sort text lines alphabetically, numerically, by length, naturally, or in random order. Filter blank lines, remove duplicates, and trim whitespace.
0 lines
All sorting happens locally in your browser. Natural sort handles mixed text and numbers (e.g., file1, file2, file10) correctly.
How to Use This Tool
- 1
Enter your text
Paste or type text with one item per line. Click "Load Sample" to try an example.
- 2
Choose sort mode
Select how to sort: alphabetically, numerically, by length, naturally (mixed text+numbers), reverse, or random.
- 3
Set options
Toggle case sensitivity, duplicate removal, blank line filtering, or whitespace trimming as needed.
- 4
Sort and copy
Click "Sort Lines" to process. Copy the sorted output with one click.
Frequently Asked Questions
- What is natural sort?
- Natural sort handles embedded numbers correctly. For example, "file2" comes before "file10" instead of after, which is how humans naturally expect items to be ordered.
- Does it support Unicode text?
- Yes. The sorter uses locale-aware comparison, so it handles accented characters, CJK text, and other Unicode correctly.
- Can I sort and remove duplicates at the same time?
- Yes. Enable the "Remove duplicates" checkbox along with any sort mode. Duplicates are removed before sorting.
- Is my data sent to a server?
- No. All processing happens entirely in your browser. Your text never leaves your device.