Sort Lines Alphabetically
Sort text rows alphabetically for a list, set of labels, or filenames.
Result
How to use
- Put one sortable entry per line. Review the ordering before pasting it back into a document or data file.
- 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.
Limitations and troubleshooting
Protect any header row by leaving it out of the list you sort.
Remove repeated entries from the list
Frequently asked questions
Is alphabetic sorting always the same as numeric sorting?
No. Text ordering can place 10 before 2. For numeric identifiers, check the sample or sort as numbers in the destination.
What rule does the Sort Lines Alphabetically apply?
Split the input at line breaks, compare lines in English alphabetical order with numeric comparison, and rejoin them.
What should I see in the Sort Lines Alphabetically example?
Pear, apple, and banana sort into apple, banana, and pear.
What should I verify after using Sort Lines Alphabetically?
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.