Helpful Toolbox

Sort Text Lines

Paste your list, pick a sort order, and get clean, ordered lines back in an instant — all in your browser.

📖 How it works & FAQ
Enter some lines above, then press Sort lines.

What this tool does

Sort Text Lines takes any block of text — one item per line — and reorders it the way you need. Choose alphabetical (A→Z), reverse alphabetical (Z→A), by line length (shortest or longest first), or simply flip the current order. It is perfect for tidying lists of names, emails, tags, CSV columns, keywords, imports, or any messy list you have pasted from a spreadsheet or document.

The clean-up options

Three checkboxes let you clean while you sort. Case-insensitive treats "Apple" and "apple" as equal, so mixed-case lists group naturally instead of pushing capitals ahead of lowercase. Remove blank lines strips out empty rows and whitespace-only gaps. Remove duplicates keeps only the first occurrence of each line — combined with case-insensitive, "Cat" and "cat" count as the same entry. Alphabetical sorting is also number-aware, so "item2" comes before "item10".

How to use it

  1. Paste or type your list into the Your lines box, one item per line.
  2. Pick a Sort order from the dropdown.
  3. Tick any of case-insensitive, remove blank lines, or remove duplicates.
  4. Press Sort lines to see the result and a count of what changed.
  5. Press Copy result to grab the sorted text for pasting anywhere.

FAQ

Is my text uploaded anywhere?
No. Everything runs inside your browser using JavaScript. Your text never leaves your device and nothing is sent to a server.
How does "by length" sort ties?
Lines of equal length fall back to alphabetical order, so the result stays predictable and stable.
Does removing duplicates keep the first or last copy?
It keeps the first occurrence and drops later repeats. Turn on case-insensitive to also merge entries that differ only by capitalization.
Can I undo a sort?
Your original text stays in the top box, so you can change options and press Sort lines again as many times as you like.