Sort your text lines alphabetically and organize your content quickly and easily.
Organize lists by sorting complete text lines in ascending or descending order. This free browser-based tool also lets you remove empty lines without sorting the remaining text.
Choose Remove Empty Lines instead when you only want to remove blank or whitespace-only lines. Use Clear to reset the tool.
zebra
apple
banana
apple
apple
apple
banana
zebra
Sorting places the lowercase words in alphabetical order. Both copies of apple remain because this is a sorting tool, not a duplicate removal tool.
Sort A-Z places text lines in ascending order using the browser's locale-aware string comparison.
Sort Z-A uses descending order. For example, zebra, banana and apple appear in that order when sorting those three lowercase words Z-A.
This tool uses text comparison, not numeric comparison.
For example, sorting the lines 1, 2 and 10 in ascending text order produces 1, 10 and 2.
If you need mathematical numeric sorting, use a dedicated numeric sorting tool instead.
The tool does not convert letters to uppercase or lowercase before sorting.
It uses JavaScript localeCompare to compare text lines. The relative position of uppercase letters, lowercase letters and accented characters can vary by browser and language settings.
Consequently, results involving different languages or accents may not match a simple character-code sort.
Sorting keeps the original contents of each line, including leading spaces and trailing spaces.
Spaces and tabs can affect the sorting order. The tool does not trim or normalize nonempty lines when sorting.
Duplicate lines remain in the sorted result. To remove repeated lines, use the separate Remove Duplicate Lines tool.
The Remove Empty Lines action removes both completely blank lines and lines containing only spaces or tabs.
Nonempty lines retain their original content and order.
For example, a list containing apple, a blank line and banana becomes apple followed by banana.
This operation does not alphabetically sort the remaining lines and does not remove duplicates.
The sorter recognizes LF, CRLF and CR line separators, which may appear in text copied from different operating systems.
Generated results use LF line endings. The original text in the input box is not rewritten by the sorting operation.
The live line counter shows zero for an empty input. A final newline counts as an additional empty line.
Changing the source text clears the previous result to prevent accidentally copying outdated data. Run your chosen operation again after making an edit.
This tool sorts complete lines rather than individual words, columns or structured data fields.
Sorting is lexicographic and locale-aware, not numeric. It does not remove duplicate lines automatically.
Since output uses LF line endings, the generated text may have different line separators from the original.
Review the result before using it in workflows where exact line ordering or whitespace matters.
Sorting and empty-line removal run locally in your browser using JavaScript. These operations do not send your pasted text to an external sorting API.
Copy Result attempts to place the generated text on your device's clipboard. Clipboard access depends on browser permissions.
Yes. The tool offers ascending and descending text-line sorting.
Yes, as text. It does not use numeric value ordering, so 10 may appear before 2.
No. Sorting retains repeated lines. Use Remove Duplicate Lines if you want to eliminate repeats.
No. It removes blank and whitespace-only lines while preserving the order of the remaining lines.
No. Original capitalization is preserved. Case and accent ordering depend on locale-aware string comparison.
Editing the input clears the previous result so that you do not copy outdated text.
The sorting operations run in your browser without calling an external text-sorting API.