Sort Lines Alphabetically
Sort and clean a list. Your text stays on your device.
0 lines · 0 characters
Showing the first 160 lines. The tool processes the full list.
Showing the first 160 lines. Copy and download include the full result.
Processed on this device — nothing is uploaded
What you can do here
- A–Z, Z–A and natural order
- Numeric and grapheme-length sorting
- First-occurrence deduplication
- Reverse, shuffle and numbering
- Copy and .txt export
How do I put a list in alphabetical order?
Sort Lines Alphabetically puts a pasted list in A–Z or Z–A order, one item per line. Choose from 8 ordering options, including natural order for labels such as item2 and item10. You can trim spaces, remove blank lines, remove duplicates and number the result. The browser processes the entire list on your device.
Sort Lines puts a pasted list in order one line at a time. Paste item10, item2 and item1: plain A-Z gives item1, item10, item2, while Natural gives item1, item2, item10. Beyond A-Z and Z-A there are numeric, length, reverse and shuffle options. Tick Remove duplicates to keep only the first copy of each line, Trim to strip stray spaces, and Number the lines to add a count. The summary reports how many lines came in and went out.
Key facts
- Price
- Free
- Sign-up
- None
- Upload
- None — runs on your device
- Limits
- 8 ordering options · Lists over 12,000 lines show a 160-line preview
- Works with
- One item per line
- Output
- Sorted or cleaned list · UTF-8 .txt file · Line and duplicate counts
- Updated
How do I alphabetize lines and remove duplicates?
- Paste the list
Put one item per line in Input text. The line and character count updates as you paste.
- Pick an order and clean-up
Choose A-Z, Z-A, natural, numeric, length, reverse or shuffle. Turn on trim, remove empty lines, remove duplicates or numbering.
- Sort, then copy or save
Press Sort lines. The summary shows lines in, lines out and duplicates removed, and you can copy the result or download a .txt file.
Which sort order should I use for words and numbers?
The tool trims first, removes empty lines next and then removes duplicates when those options are on. After it reorders the result, it adds line numbers if requested. Alphabetical and natural ordering follow your browser’s language settings. By length counts visible characters, including spaces, after any trimming.
| Order | Example result |
|---|---|
| A–Z | item1, item10, item2 |
| Natural | item1, item2, item10 |
| Numeric | −1, 2, 10 |
| By length | a, bb, ccc |
Frequently asked questions
How can I remove duplicate lines without sorting?
Choose None under Sort order and turn on Remove duplicates. The tool keeps the first occurrence of each line and leaves the remaining lines in their original order.
How do I sort item2 before item10?
Choose Natural to compare groups of digits as numbers inside text labels. A–Z uses standard text comparison, which puts item10 before item2.
What is the difference between natural and numeric order?
Natural order works with labels containing both letters and digits. Numeric order compares each whole line as a number and keeps nonnumeric lines after the numbers.
Can I ignore case while removing duplicates?
Yes. Turn on Remove duplicates and clear Case-sensitive duplicates. The first matching line stays in the result with its original capitalization.
Does Sort Lines upload the list I paste?
No. The pasted list is sorted in your browser. The site counts anonymous use events. Those events contain no list items, names or output text.
Presets
Related tools
About this tool
Made by ZirkoMirko. Last updated .
Check it yourself in your browser’s Network panel while using the tool. How we handle your data.