About the Sort Lines
Paste a list and sort it A to Z, Z to A, by number or by line length. Numeric sorting orders values by size rather than by first digit, so 10 comes after 9.
Why sort a list
Sorted lists are easier to scan, check and clean. Alphabetical order helps with names, glossaries and keyword lists. Numeric order suits prices, scores and reference numbers. Sorting by length can reveal very short or very long entries that deserve a second look. Doing this by hand in a text editor or spreadsheet takes several steps, while a sorter finishes the job instantly and never skips a line.
Sort orders explained
A to Z orders lines alphabetically and ignores capital letters, so apple and Banana sort the way you would expect. Z to A simply reverses that. Numeric modes compare lines by value, so 9 comes before 10, which a plain alphabetical sort would get wrong. Lines that are not numbers are placed at the end in both numeric modes. Shortest first and longest first compare the number of characters in each line.
Example uses
Sort a list of names before sharing it, order prices from cheapest to most expensive, arrange a list of web addresses, or prepare keywords for grouping. Sorting before removing duplicates is especially useful because identical entries end up next to each other, which makes them easy to spot. When you are ready, use our Remove Duplicate Lines tool to clean the list.
Tips for clean results
Put one item on each line. Leading spaces count as characters and can change the order, so clean them first. Numbers written with thousands separators, such as 1,200, are read only up to the comma, so remove the separators before a numeric sort. Negative and decimal numbers are handled correctly. The tool only reorders lines and never changes their content.
Sorting and language
Alphabetical sorting follows your browser's language rules, so accented letters such as Γ© or ΓΌ sit next to their plain versions instead of at the very end. Lines that begin with symbols or numbers usually come before lines that begin with letters. If you need a special custom order, sort the list first and then move the few exceptions by hand.
Sorting for different jobs
Different jobs call for different orders. Sort names A to Z before sharing a class list, sort scores from high to low to see the top results, and sort by length to find unusually long entries that may contain mistakes. Dates only sort correctly when they are written in a sortable style such as 2026-10-05, because a date like 5 October 2026 would be sorted as ordinary words. If you need your own special order, number the lines first, sort them, and then remove the numbers.
How to use it
- Paste one item per line.
- Choose a sort order.
- Copy the sorted lines.
Frequently asked questions
How are lines without numbers handled in numeric sorting?
Lines that are not numbers are placed at the end.
Is alphabetical sorting case sensitive?
No. Alphabetical sorting ignores letter case.