Lines
--
Free · Instant · No signup
Sort non-empty lines A to Z or Z to A with a locale-aware compare.
Page updated 2026-09-04.
Lines
--
'zeta / alpha / mu / beta' sorted ascending becomes 'alpha / beta / mu / zeta' -- 4 lines rearranged into standard A-to-Z order, with no lines lost or duplicated in the process.
This sorts each line as a complete string, comparing them character by character from the start -- which works intuitively for simple word lists like this example, but can produce less obviously 'alphabetical' results for lines with leading numbers, mixed case, or punctuation, since string comparison rules don't always match how a human would casually sort a list.
Switching to descending order would simply reverse the comparison direction, producing 'zeta / mu / beta / alpha' instead -- the same underlying sort logic, just inverted.
Empty lines are dropped. Original punctuation is kept on each line. A blank line in the input simply disappears from the sorted output rather than being sorted into some position or preserved as an empty entry -- useful for cleaning up a list that has stray blank lines mixed in from copy-pasting.
Any punctuation or formatting already on each line (trailing commas, quotation marks, etc.) stays exactly as it was -- this tool reorders lines, it doesn't clean or reformat the content of each line itself.
Case sensitivity in sorting can matter for real-world lists -- depending on how the comparison is implemented, uppercase and lowercase versions of similar words might sort differently than expected; if your list mixes cases, results are worth a quick visual check against what you intended.
If the goal is joining these lines into one continuous string rather than reordering them, the Line Break / Newline Joiner handles that different transformation.
To compare two versions of a list and see what's different between them (rather than sort one list), the Text Difference / Merge Checker is the relevant tool.
It compares lines as complete strings, character by character from the start -- similar to how a dictionary orders entries. This works well for simple word lists but can produce non-obvious results for lines starting with numbers or mixed capitalization.
Empty lines are dropped. Original punctuation is kept on each line. They're removed entirely from the output rather than sorted into a position or kept as empty entries -- useful for cleaning up a list that picked up stray blank lines from copy-pasting.
No. Empty lines are dropped. Original punctuation is kept on each line. This tool only reorders the lines -- any punctuation, trailing spaces, or formatting already present on each individual line is preserved exactly as it was in the input.
It can, depending on how the comparison treats character case -- if your list mixes capitalization inconsistently, it's worth visually checking the sorted output against what you expected, since string comparison doesn't always match casual human intuition about alphabetical order.
No, sorting and deduplication are separate operations -- this tool only reorders lines alphabetically. If your list also has duplicate entries you want removed, that would need to be handled with a separate deduplication step.
Daily Water Intake Calculator Daily water from weight, exercise minutes, and climate, in oz, liters, or cups.
Word Frequency Counter & Density Inspector Top tokens of three or more letters with counts and percent density in the passage.
NATO Phonetic Alphabet Translator Spell letters and digits as Alpha, Bravo, Charlie through Zulu and Zero through Nine.
Leap Year & Century Calculator Say whether a year is a Gregorian leap year, which century it sits in, and the next leap year.