Sort Lines Online — Alphabetical, Numeric, Natural and by Length
Sort lists ascending, descending, numerically or by character length cleanly.
- Alphabetical order ignores case and accents, so Apple, banana and Éclair sort as if all were lower case without accents (É counts as e). Numeric mode reads the first number on each line (1.234,5 and 1,234.5 are both 1234.5), and lines without a number go last. Equal lines keep their original order.
When to use the Alphabetical, Numeric, Length & Natural Line Sorter
Natural order for file names
Plain alphabetical order puts file10 before file2 because it compares one character at a time. Natural order reads runs of digits as numbers, giving file1, file2 and then file10, as a file manager does.
Case and accents ignored
Apple and apricot are not split apart by a capital A, and Éclair sorts as eclair. Equal lines keep their original order, so sorting again never shuffles the result.
Numbers with thousands separators
Numeric order reads the first number on each line and understands both 1.234,5 and 1,234.5. Lines without a number go last whether you sort up or down, so they never mix with the data.
Reversed, unique and blank lines
Sort Z to A or largest first, drop identical lines, and skip blank lines so they do not pile up at the top. Line length counts Unicode characters, not bytes.
Frequently asked questions
Why does file10 come before file2?
That is plain alphabetical order. Choose natural order so numbers inside the text compare as numbers.
Does it follow the English alphabet?
Yes for A–Z. Accented letters sort as their base letter, and other scripts such as Arabic or Han sort by Unicode code point.
How is this different from removing duplicate lines?
Here identical lines are dropped after sorting. The duplicate remover keeps the original order and can ignore letter case.
Is my list sent anywhere?
No, sorting happens in your browser.
Similar tools
- Real-Time Regular Expression & Capture Group TesterTest JS patterns (g/i/m) live with match count, offset indexes & presets.
- Line-by-Line & Inline Word Diff CheckerCompare .env, router scripts & JSON side-by-side showing added & deleted lines.
- UPPER, lower, camelCase, snake_case, kebab-case ConverterTransform strings cleanly between camelCase, PascalCase, snake_case & Title.
- Regex & Multi-Line Find and Replace ToolPerform fast multi-line plain text or RegExp search & replace in browser.