Skip to main content
Toolisti

Sort Lines Alphabetically

Sort any list of lines alphabetically (A-Z or Z-A), numerically with natural ordering, by line length, or reverse and shuffle them.

100% in-browser Β· no data sent

Combine with options to remove duplicates, drop blank lines, and trim whitespace, then copy the clean result.

Embed This Tool

Add this tool to your website with customizable styling

Get Embed Code

How to Use

  1. 1 Paste your list β€” Enter or paste your text into the box, one item per line.
  2. 2 Pick a sort order — Choose alphabetical (A→Z / Z→A), numeric/natural, by length, reverse, or random shuffle from the dropdown.
  3. 3 Set your options β€” Toggle case-sensitive sorting, remove duplicates, remove blank lines, or trim whitespace as needed.
  4. 4 Review the stats β€” See how many lines you started with, how many remain, and how many were removed.
  5. 5 Copy the result β€” Click Copy to grab your sorted list, ready to paste anywhere.

πŸ’‘ Pro Tip: Combine "Remove duplicate lines" with "Alphabetical (A β†’ Z)" to turn a messy list into a clean, unique, alphabetized set in one step.

Frequently Asked Questions

How does alphabetical sorting handle uppercase and lowercase?

By default sorting is case-insensitive, so 'apple' and 'Apple' sort next to each other. Enable "Case-sensitive sort" if you want capital letters ordered separately from lowercase letters.

What is numeric / natural sorting?

Natural sorting treats numbers inside text the way a human would, so 'item2' comes before 'item10' instead of after it. Regular alphabetical sorting would put 'item10' first because it compares character by character.

Can I sort and remove duplicates at the same time?

Yes. Turn on "Remove duplicate lines" and pick your sort order β€” the tool removes duplicates first, then sorts the remaining unique lines. You can also remove blank lines and trim whitespace in the same pass.

Does the shuffle produce a different order each time?

Yes. Shuffle uses a random Fisher-Yates ordering. When shuffle is selected, a "Shuffle again" button appears so you can reroll the order as many times as you like.

Is my text uploaded anywhere?

No. All sorting happens locally in your browser using JavaScript. Your text never leaves your device and nothing is sent to a server.