Sort Lines — Free Online Text Tool

Sort Lines — Alphabetize a List Online

Paste a list and click SORT A-Z to put the lines in alphabetical order, or SORT Z-A for reverse order. Each line is kept whole, so names, addresses, URLs and sentences stay intact. Sorting runs in your browser; nothing is uploaded.

How sorting works

  • Lines are compared with your browser's language-aware ordering, the same order a person would expect: apple, Banana and cherry sort together regardless of capital letters, and accented letters sort beside their base letter (école with the e's).
  • Blank lines are removed from the sorted result, so stray empty lines do not collect at the top.
  • Duplicates are kept. Run REMOVE DUPES first for a list of unique lines.
cherry
Banana
 
apple

becomes

apple
Banana
cherry

Numbers sort as text

Lines are compared character by character, so 10 comes before 9 and item-12 before item-2. If you need numeric order, pad the numbers with leading zeros (09, 10) before sorting, or use sort -n on the command line.

Common uses

  • Alphabetize names, tags or keywords before pasting them into a document or a CMS.
  • Tidy configuration lists — allow-lists, .gitignore entries, dependency lists — so additions are easy to review.
  • Prepare two lists for comparison: sort both the same way, then compare them in Text Diff.
  • Find duplicates by eye — identical lines end up next to each other.

Combine with the other buttons

  1. REMOVE DUPES — keep each line once.
  2. SORT A-Z — alphabetize.
  3. COUNT LINES — see how many unique entries remain.

For lists separated by spaces instead of line breaks, run SPACE → NEWLINE first, or use Sort Words.

On the command line

The equivalent in a terminal is sort file.txt; add -u to drop duplicates, -f to ignore case and -n for numeric order. See the sort command guide.