This tool is part of these guided projects. Each project provides step-by-step instructions with checklists and all the tools you need in one place.
Tools you might need next
Add line numbers to text automatically. Prefix each row with sequential indices for code snippets, documentation, legal excerpts, and shared references.
Remove duplicate lines from text while keeping unique rows. Clean email lists, URLs, log entries, and data files quickly with this free online tool.
Strip blank and whitespace-only lines from pasted text. Tighten prose, config files, and copied data for cleaner exports without manual editing.
Lines are sorted using locale-aware comparison (Intl.Collator) or raw Unicode code point order. Options include case sensitivity, numeric sorting (10 after 9, not after 1), and reverse order.
Lexicographic: compare char by char using Unicode/locale order; Numeric: extract leading numbers, compare numericallyA stable sort preserves the relative order of equal elements. This matters when sorting by one key while maintaining previous sort order. JavaScript Array.sort is stable in modern engines.
Updated: July 2026
Sort a vocabulary list alphabetically for a glossary or index.
→ Alphabetically sorted list where "apple" comes before "Banana"
Sort numbered filenames so file10 comes after file9 (not after file1).
→ file1.txt, file2.txt, file10.txt (numeric order)
Default lexicographic sort puts "10" before "2" because "1" < "2" character-by-character. Use natural/numeric sort for version numbers, file names, and numbered items.
German ä sorts differently in German (after a) vs Swedish (after z). Spanish ch was historically a single letter. Always specify locale for correct alphabetical ordering of non-English text.
Sort lines alphabetically or numerically in any text list. Free online line sorter for cleaning datasets, organizing names, and preparing sorted output. It applies the sorting algorithms for text (Lexicographic: compare char by char using Unicode/locale order; Numeric: extract leading numbers, compare numerically). For example: alphabetize a word list — Sort a vocabulary list alphabetically for a glossary or index.