Sort Lines
Sort lines of text alphabetically A to Z or Z to A, by length, numerically, or shuffle randomly. Options to ignore case and remove duplicates.
What is the Sort Lines?
The ByteTools Sort Lines tool arranges the lines of any text or list in the order you choose: alphabetical A→Z or Z→A, shortest-to-longest by length, numeric order for lists of numbers, or a random shuffle.
- Five modes: A→Z, Z→A, by length, numeric and random shuffle
- Case-insensitive sorting option
- Remove duplicates while sorting
- Live result with line count
- Copy or download the sorted list
- 100% private — everything runs locally
How to use the Sort Lines
- 1
Paste your list into the input box, one item per line.
- 2
Pick a sort order: A→Z, Z→A, by length, numeric, or random shuffle.
- 3
Optionally enable case-insensitive sorting and duplicate removal.
- 4
Copy the sorted result or download it as a .txt file.
About the Sort Lines
The ByteTools Sort Lines tool arranges the lines of any text or list in the order you choose: alphabetical A→Z or Z→A, shortest-to-longest by length, numeric order for lists of numbers, or a random shuffle. The sorted result updates live as you type or change options.
Extra options let you ignore capitalization while sorting and remove duplicate lines in the same pass, so 'banana' and 'Banana' sort together and repeated entries disappear. It is ideal for organizing keyword lists, names, bibliographies, TODO lists and data exports.
Sorting happens entirely in your browser — no upload, no server, no waiting. Copy the sorted list to your clipboard or download it as a .txt file.
Frequently asked questions
How do I sort a list alphabetically online?
Paste the list into the input box with one item per line and choose A→Z. The lines are instantly rearranged in alphabetical order, and you can copy the sorted list back to your clipboard with one click.
What is the difference between alphabetical and numeric sorting?
Alphabetical sorting compares text character by character, so '10' comes before '2'. Numeric sorting reads each line as a number first, ordering 2 before 10. Use numeric mode whenever your list contains numbers or prices.
Can I sort without worrying about capital letters?
Yes — enable the case-insensitive option and 'apple', 'Apple' and 'APPLE' are treated identically during comparison, producing a natural dictionary-style order instead of grouping all capitals first.
Can I shuffle lines into a random order?
Yes. Choose Random shuffle and the lines are rearranged using the Fisher–Yates algorithm, which gives every ordering an equal chance. Click Reshuffle to generate a new random arrangement of the same lines.
Does sorting remove duplicate entries?
Only if you ask it to. Enable the remove-duplicates option and repeated lines are dropped during the sort, leaving one copy of each. Otherwise every line, including duplicates, is kept and simply reordered.
Guides for Sort Lines
Related tools
Remove Duplicate Lines
Delete duplicate lines from any list or text instantly. Case-insensitive matching, whitespace trimming and keep-first or keep-last options.
Reverse Text
Reverse text instantly: flip character order to create mirror text, reverse word order in sentences, or invert the order of lines in a list.
Remove Empty Lines
A free empty line remover that strips blank lines from text or code in one click. Optionally delete whitespace-only lines or collapse multiple blanks into one.
Word Counter
Count words, characters, sentences, paragraphs and estimated reading time instantly. Free online word counter for essays, blogs and social media.