Sort Lines of Text
Paste a list and sort the lines alphabetically or by number. Reverse the order, ignore case, or strip duplicate lines, then copy the clean result.
How to sort lines of text
- Paste your list into the box, one item per line.
- Pick ascending or descending, and turn on numeric, case-sensitive, or remove duplicates if you need them.
- Copy the sorted result.
Examples
Alphabetize a list
banana apple cherry
apple banana cherry
Sort numbers in order
10 2 1
1 2 10
Frequently asked questions
How is numeric sorting different from alphabetical?
Alphabetical sorting compares text character by character, so '10' lands before '2'. Numeric sorting reads each line as a number, so 2 comes before 10. Turn on the numeric option for lists of numbers.
Does sorting ignore upper and lower case?
By default it does, so 'apple' and 'Apple' group together. Turn on case-sensitive sorting to treat uppercase and lowercase as distinct, which places capitalized lines first.
Can I sort in reverse order?
Yes. Switch the order to descending to sort Z to A, or from highest to lowest number when numeric sorting is on.
Can it remove duplicate lines while sorting?
Yes. Turn on remove duplicates and any repeated lines are dropped after sorting, leaving one of each. Case-insensitive mode treats 'Apple' and 'apple' as the same line.
What happens to blank lines and number lists with words?
A single trailing newline is ignored so it does not create an empty entry. In numeric mode, lines that are not numbers are kept and moved to the end of the list.
Is my text private?
Yes. Sorting runs entirely in your browser and nothing is uploaded to a server.
Related tools
Remove Duplicate Lines
Remove duplicate lines from text online and keep the first of each. Options for case sensitivity and trimming whitespace. Free, instant, and private.
Remove Line Breaks
Remove line breaks and paragraph breaks from text online. Flatten copied text into one line, keep spaces tidy, then copy the result. Free and private.
Add Line Numbers
Add line numbers to any text online. Set the start value, step, and separator, pad numbers to align, and copy or download the result. Free and private.
Bullet List Maker
Turn lines of text into a bullet or numbered list online. Pick dash, asterisk, dot, arrow or numbers, add indent, then copy. Free and private.
Caesar Cipher
Encode and decode text with the Caesar shift cipher. Pick any shift, see the result live, and brute force all 25 shifts. Runs entirely in your browser.
Case Converter
Convert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. Free and private.