Text & Regex
Line Sorter
Paste a list and sort it alphabetically, numerically, naturally, by length, or at random. Trim whitespace, drop blank lines, and remove duplicates with a click. Everything runs in your browser — your text never leaves the page.
Sort options
liveInput
0 linesOne item per line. Sorting updates as you type.
Sorted output
0 linesHow it works
Your text is split on line breaks and sorted with plain JavaScript, so nothing is sent
anywhere. Natural sorting compares digit runs by value, so file2 comes before
file10, while numeric sorting reads the first number on each line and keeps
non-numeric lines at the bottom. Blank and whitespace-only lines are always dropped before
sorting, and duplicate lines are removed only when you ask for it. Line endings are
preserved on output.