How do I use the sort lines tool?
Paste your lines into the left box, one item per line, choose a sort order, and the sorted list appears on the right as you type. The default three lines (cherry, apple, banana) sort A to Z as apple, banana, cherry. Press Sample to load a mixed list of numbers and words sorted numerically with empty lines removed. The counters show lines in, lines out and the longest line length, and you can copy the result or download it as sorted-lines.txt.
What sort orders are available?
Seven orders cover most jobs. A to Z and Z to A sort alphabetically forwards or backwards. Shortest to longest and longest to shortest sort by line length, with alphabetical order breaking ties. Numeric sorts by number value, placing numbers first and any text after them alphabetically. Shuffle puts the lines in a random order, handy for picking winners or randomising a list, and Reverse simply flips the current line order top to bottom.
What is the difference between alphabetical and numeric sorting?
Alphabetical sorting compares text character by character, so “10” comes before “2” because the character 1 is less than 2. That is correct for words but wrong for numbers. Numeric sorting compares values instead: 2, 10, 30. Use numeric mode whenever your lines are numbers, prices, scores or sizes, and alphabetical mode for names, words and labels. The sample list shows the difference: numerically it becomes 2, 10, 30, then the words Apple, apple, banana, cherry.
What does case-sensitive sorting change?
By default, sorting ignores case, so “apple” and “Apple” sit together and “Banana” sorts after “apple”. With case-sensitive sorting on, uppercase letters come before lowercase ones (in character-code order), so “Banana” sorts before “apple”. Case-insensitive is what most people expect for names and word lists; case-sensitive matches how many programming tools and file systems order text, so use it when you need that exact behaviour.
What is sorting lines used for?
Sorting lines cleans up lists of names, keywords, URLs, file names, log entries and data exports. It makes duplicates easy to spot (they land next to each other), turns a newest-first log into oldest-first with Reverse, and prepares lists for merging or comparing. Combined with the Remove empty lines option, it is a quick way to tidy text copied from spreadsheets, documents or code before using it elsewhere.
Is it free and private?
Yes. The sort lines tool is completely free, needs no sign-up, and runs entirely in your browser. Your lists are never uploaded to a server. It works on phones, tablets and desktop computers.