Sort Lines Alphabetically
Sort text rows alphabetically for a list, set of labels, or filenames.
Result
How to use Sort Lines Alphabetically
- Paste your source text in the input box.
- Select Convert to generate the output.
- Review the output before copying it.
How it works
Sort text rows alphabetically for a list, set of labels, or filenames. Split the input at line breaks, compare lines in English alphabetical order with numeric comparison, and rejoin them.
Formula or processing rules
Split the input at line breaks, compare lines in English alphabetical order with numeric comparison, and rejoin them.
Worked example
Pear, apple, and banana sort into apple, banana, and pear.
| Measure | Value |
|---|---|
| Source text | pear apple banana |
| Result | apple banana pear |
Pros and cons
Pros
Sort text rows alphabetically for a list, set of labels, or filenames. The sample provides an immediate check of the expected output.
Cons
Blank lines are kept, and duplicated entries remain in the result.
Troubleshooting
Check the input format and compare your case with the built-in sample. Blank lines are kept, and duplicated entries remain in the result.
Frequently asked questions
How do I use the text I get back?
Copy the output into the document, list, or compatible tool where you need it.
How does the transformation work?
Split the input at line breaks, compare lines in English alphabetical order with numeric comparison, and rejoin them.
Can I try a sample first?
Pear, apple, and banana sort into apple, banana, and pear.
What should I check before using the result?
Blank lines are kept, and duplicated entries remain in the result.
Is my input stored by the tool?
The transformation is computed in the open page. The tool does not save the submitted text.