Sort Lines
Sort the lines of a block of text alphabetically.
This Sort Lines tool alphabetically sorts every line in a block of text, in either ascending or descending order — handy for organizing lists, CSV-like data, or code identifiers before further processing. Paste your text, choose a sort direction, and click Sort for an instant result computed in your browser.
How to use
- 1Paste your text into the input.
- 2Choose ascending or descending order, then click Sort.
Frequently asked questions
What does sorting lines alphabetically mean here?
Each line of your text is treated as one item and reordered based on standard alphabetical (character) comparison, either A-to-Z or Z-to-A depending on the direction you choose.
What is this used for?
Alphabetizing a list of names or terms, ordering entries before deduplicating or scanning them, or preparing a list for a place where sorted order is expected.
How are numbers or mixed-case lines sorted?
Lines are compared using standard text sort order, the same behavior you'd see sorting strings in most programming languages or spreadsheet tools.
Does sorting remove any lines?
No — every line you paste in is kept; sorting only changes their order, not their content or count.