Sort Lines
Sort all non-empty lines in your text alphabetically. Useful for lists, code, or any text that needs to be ordered.
Results
Instructions
- Paste or type your text into the input box. Each line will be processed.
- Example: banana\napple\ncarrot\n\npear
- Click Convert to see your text sorted alphabetically, one line per entry.
- Example output: apple\nbanana\ncarrot\npear
- All empty lines in your input will be ignored.
Frequently Asked Questions (FAQs)
What happens to empty lines in my input?
All empty lines are ignored. Only non-empty lines are kept and sorted.
Is the sorting case-sensitive?
Yes, uppercase letters will be sorted before lowercase letters. For case-insensitive sorting, convert your text to lowercase first.
Can I sort numbers as well as text?
Yes, numbers will be sorted as strings (alphabetically), not numerically.
Will the tool work with very large texts?
Yes, the tool is designed to handle large multi-line text inputs efficiently.
API Usage
API Usage
This tool provides an API for programmatic access.
Endpoint: POST /tools/sort-lines/api/
Request Body: { "text": "banana\napple\ncarrot\n\npear" }
Response: The response will be the sorted text, one line per entry. { "result": "apple\nbanana\ncarrot\npear" }