Sort Lines
Paste lines above to sort them.
Sort Lines reorders any list of text lines in your browser. Choose alphabetical order, a case insensitive sort, numeric order, sort by line length, or simply reverse the current order. Nothing leaves your device, so it works instantly even on long lists.
How to use
- Paste or type your lines into the input box, one item per line.
- Pick a sort method: alphabetical, case insensitive, numeric, line length, or reverse.
- Choose ascending or descending. Reverse keeps your direction choice out of the way because it just flips the existing order.
- Read the sorted result in the output box and copy it with the Copy button.
Examples
- Input: banana, apple, Cherry (each on its own line). Alphabetical (case insensitive), ascending gives: apple, banana, Cherry.
- Input: 10, 2, 1, 20 (each on its own line). Numeric, ascending gives: 1, 2, 10, 20, instead of the text order 1, 10, 2, 20.
- Input: dog, ant, horse (each on its own line). Line length, ascending gives: ant, dog, horse.
FAQs
- What is the difference between case sensitive and case insensitive sorting?
- A case sensitive sort places all uppercase letters before lowercase ones, so Apple comes before banana. A case insensitive sort ignores capitalization and orders words the way most people expect, so apple, Banana, cherry stay together regardless of case.
- How does numeric sorting handle lines that are not numbers?
- Numeric sorting reads the number at the start of each line, so 10 sorts after 2. Lines that do not start with a number are kept and placed after the numeric lines, ordered alphabetically among themselves, so nothing is dropped.
- Does it keep blank lines in my text?
- A single trailing newline at the very end is removed so you do not get an empty entry. Blank lines in the middle of your text are kept and sorted along with everything else.
- Is my text sent to a server?
- No. All sorting runs in your browser with client-side code. Your text never leaves your device, which makes the tool fast and private.
- Can I sort a very long list?
- Yes. The tool handles thousands of lines smoothly because the work happens locally and is just an in memory sort.
Related tools
- Remove Duplicate LinesRemove duplicate lines from text online. Optional case insensitive matching and whitespace trimming, with a count of removed lines.
- Find and ReplaceFind and replace text online. Case insensitive, whole word, and regex modes with a live replacement count. Runs in your browser.
- Whitespace RemoverClean up whitespace in text. Trim lines, collapse extra spaces, remove blank lines, or strip all spaces. Free, fast, and private in your browser.
- Text ReverserReverse text by characters, by word order, or by line order. Emoji safe and fully client-side. Paste, pick a mode, and copy the result.
- Word CounterCount words, characters, sentences, paragraphs, and reading time for any text. Live, private, and free in your browser.
- Case ConverterConvert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case, and kebab-case instantly in your browser.