How to sort lines
- Paste your lines into the top box — names, imports, CSV values, to-do items, anything with one entry per line.
- Pick a sort mode (A→Z, Z→A, numeric ascending or descending, or by length) and adjust the options: case-insensitive, trim lines, ignore blanks, or remove duplicates as you sort.
- The ordered list appears instantly below. Click Copy or Download .txt to save it.
Natural sorting: item2 comes before item10
A plain alphabetical sort compares text one character at a time, so item10 ends up before item2 — because the character “1” comes before “2”. That is almost never what you want. This sorter uses natural, numeric-aware comparison for its alphabetical modes, so numbers embedded in the text are read as whole values: item1, item2, item9, item10, item11, in the order a human expects. The same logic keeps version strings, file names like “photo (2)” and “photo (10)”, and numbered chapters in sensible order without any manual fixing.
Alphabetical, numeric, reverse, or by length
Five sort modes cover the common jobs. A→Z and Z→A alphabetize forwards and backwards. Numeric ascending and descending read the leading number of each line with parseFloat — so “12 apples” sorts by 12 and “3 oranges” by 3 — and fall back to text comparison when a line has no number, so mixed lists still sort predictably. By length orders lines from shortest to longest, handy for spotting outliers or lining up fixed-width data. Layer the checkboxes on top: Case-insensitive (on by default) sorts “Apple” and “apple” together; Trim lines removes stray leading and trailing spaces; Ignore blank lines drops empty rows; and Remove duplicates too collapses identical lines to one as it sorts, saving you a second pass through a separate dedupe tool. Because everything happens in your browser with JavaScript, your text is never uploaded — paste imports, client names, or private notes with confidence, with no sign-up and no size limit.
Frequently asked questions
Does it do natural numeric sorting?
Yes. With numeric handling on, item2 comes before item10 instead of after it, because numbers inside the text are compared by value, not character by character.
Can it sort case-insensitively?
Yes. Case-insensitive is on by default, so Apple and apple sort together. Turn it off to make uppercase and lowercase sort separately.
Can it remove duplicates while sorting?
Yes. Tick Remove duplicates too and identical lines are collapsed to a single copy as part of the sort.
Is my text uploaded to a server?
No. Sorting happens entirely in your browser with JavaScript. Your text never leaves your device.
Is there a size limit?
No fixed limit. Paste as many lines as you like — the sort runs instantly in memory on your own device.