Text Tools
Sort lines of text
Sort Lines reorders every line of the pasted text, A to Z by default, in your browser. Developers use it to order import statements, keyword lists and config keys, and anyone can turn a jumbled list into an alphabetical reference in one paste. Comparison follows the browser's locale rules: case is ignored unless you untick "Ignore case", accented letters sort next to their base letter, "Numbers in order" puts 2 before 10, and Z to A reverses the result.
How to use Sort Lines
- Open Sort Lines in the Toolbox101 app.
- Paste a multi-line list, such as imports, keywords or names, into the
Linesbox. - Set
Order(A to Z or Z to A), and tick or untickIgnore caseandNumbers in order (2 before 10). - Read the sorted lines in the
Outputbox, which updates as you type, and clickCopyto take them.
Worked example
Sort Lines returns the output below for this input.
Input
orange
banana
apple
cherryOutput
apple
banana
cherry
orangeCheck it yourself: open Sort Lines and enter the same input.
Frequently asked questions
How does it treat capital letters?
By default Ignore case is ticked, so apple and Zebra sort as a and z regardless of case. Untick it for a case-sensitive order, where a and A are still neighbours but no longer tie, with the lowercase form first.
How are lines with numbers sorted?
As text by default, so 10 comes before 2. Tick Numbers in order and digits are compared by value, giving 2, 10, 100, and file2 before file10.
Where do blank lines end up after sorting?
At the top in A-to-Z order, because an empty line sorts before any text, and at the bottom in Z-to-A. A trailing newline in your input creates one empty line, so it moves too. Use Remove Empty Lines first if you do not want them.
Does it sort accented and non-English text properly?
Yes. The comparison uses the browser's language-aware rules, not raw character codes, so é sorts with e instead of after z.