Sort Lines
Text & WritingAlphabetize a list, drop duplicates, or sort by line length.
Calculated Result
apple
apple
banana
carrot
Formula: localeCompare or first-seen unique
About this calculator
Paste a column from a spreadsheet or a playlist. Unique keeps the first copy of each exact line, including spaces.
How It Works & Formula
FormulalocaleCompare A–Z / Z–A, unique, or length
Split on newlines, then localeCompare, reverse, length sort, or a Set filter.
Related Calculators
View All (11)Diff Checker
Compare two texts line by line and mark additions and deletions.
Remove Line Breaks
Join hard wraps and keep blank-line paragraphs.
Fancy Text Generator
Map letters to bold, italic, mono, circled, fullwidth, or upside-down Unicode.
Word Counter
Count words, sentences, and paragraphs, plus reading and speaking time.