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.
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.
A plain alphabetical (lexicographic) sort compares text character by character, which means “10” sorts before “2” because “1” comes before “2” as a character. That produces the wrong order for anything meant to be read as a number.
Numeric sort mode instead reads each line as a number and compares its value, so 2 correctly comes before 10. Use alphabetical sort for names, words, and general text; use numeric sort whenever your lines represent quantities, prices, or IDs.
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).
Yes — locale-aware sorting is used, so é, ñ, ü sort naturally in their language rather than being placed at the end by raw character code.
Yes — select Z→A mode to sort lines in reverse alphabetical order.
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.
No — sorting preserves all lines including duplicates. Use the Remove Duplicates tool first if you want to deduplicate before sorting.
Yes — paste your URLs or domains one per line and use A→Z sorting. They'll be sorted alphabetically, which groups similar domains together.
Yes — lines that compare as equal (e.g. same length in length-sort mode) preserve their original relative order.
Yes — paste the prices one per line (with or without a currency symbol, as long as it's consistent) and use Numeric sort mode to order them from lowest to highest.
Not directly — for that, use Find & Replace with a regex capture group to move the last word to the front, sort, then reformat. For simple alphabetical or numeric sorting, this tool handles the line as-is from the start.
Yes — alphabetical sort treats every line as text, so mixed content sorts consistently by character. If your list is purely numeric, switch to Numeric sort mode for correct numeric ordering.