About Sort Lines
The Sort Lines tool lets you sort lines of text instantly. Arrange entries in A–Z order, Z–A order, ascending numeric order, descending numeric order, shortest-first order, or longest-first order. It works with word lists, email addresses, URLs, code snippets, and other text data.
Simply paste your text, choose a sorting method, and get the result immediately. Whether you are organizing keywords, cleaning a list, sorting names, or arranging data for a report, this tool makes the process quick and easy.
The numeric sorting mode recognizes numbers within lines. For example, "2" appears before "10" when sorting numerically. This produces more accurate results than a standard alphabetical sort, which would place "10" before "2".
Locale-aware sorting handles accented characters like é, ñ, and ü correctly, placing them in their natural language order instead of by raw character code.
Everything runs locally in your browser. Your data is never uploaded or stored on a server. Even large lists can be sorted in seconds.
How to Use Sort Lines
Paste your list into the input — one item per line.
Choose a sort mode: A→Z, Z→A, Shortest first, Longest first, or Numeric.
The sorted output appears instantly.
Copy the result with one click.
Examples
Frequently Asked Questions
Can it sort numbers correctly?
Yes — select Numeric sort mode and lines like '2', '10', '1' sort as 1, 2, 10 (not 1, 10, 2 as alphabetical sort would produce).
Does it sort accented characters correctly?
Yes — locale-aware sorting is used, so é, ñ, ü sort naturally in their language rather than being placed at the end by raw character code.
Can I sort in reverse alphabetical order?
Yes — select Z→A mode to sort lines in reverse alphabetical order.
What does sorting by length do?
Shortest First places the shortest lines at the top. Longest First places the longest lines at the top. Lines of equal length remain in their original relative order.
Does it remove duplicates when sorting?
No — sorting preserves all lines including duplicates. Use the Remove Duplicates tool first if you want to deduplicate before sorting.
Can I sort a list of domain names or URLs?
Yes — paste your URLs or domains one per line and use A→Z sorting. They'll be sorted alphabetically, which groups similar domains together.
Is sorting stable?
Yes — lines that compare as equal (e.g. same length in length-sort mode) preserve their original relative order.