Line Sorter
Sort lines alphabetically, by length, or in reverse
Everything runs in your browser. Your data never leaves your device.
Related tools
How to use
Paste your text into the input pane, then choose a sort mode from the dropdown. The sorted output appears on the right immediately.
Paste your lines
Enter or paste one item per line in the left pane. The tool treats each newline-separated segment as a distinct line.
Choose a sort mode
A → Z sorts alphabetically, Z → A sorts in reverse alphabetical order, Shortest first and Longest first sort by character count, and Reverse order flips the existing sequence.
Copy the sorted output
Click the Copy button to copy the sorted text. Change the mode as many times as you like — the original input is preserved on the left.
Examples
Sorting a list of country names
Paste a list of country names, one per line, and select A → Z. The result is an alphabetically sorted list ready to paste into a spreadsheet, document, or dropdown configuration.
Finding the longest lines in a file
Paste lines of code or prose and choose Longest first. The longest lines bubble up to the top, making it easy to spot outliers — overly long log entries, wide table rows, or lines that exceed a style guide's column limit.
About this tool
Sort the lines of any text alphabetically (A to Z or Z to A), by line length (shortest or longest first), or simply reverse the existing order. Output updates in real time as you switch modes. Useful for organising lists, deduplicating sorted output, and reordering configuration entries. Runs entirely in your browser.