ZumaTools

Sort Lines Alphabetically

Paste any list below and it is sorted live — choose alphabetical, numeric, natural, length, or random order.

Sorted result0 lines in, 0 lines out

Sorting runs entirely in your browser — nothing is uploaded.

How it works

  1. Paste or type your list into the input box, one item per line.
  2. Pick a sort mode (A to Z, Z to A, numeric, natural, by length, shuffle, or reverse) and toggle options like case-insensitive or remove duplicates.
  3. Copy the sorted result to your clipboard or download it as a .txt file.

Frequently asked questions

What is the difference between alphabetical and natural sort?
Plain alphabetical sort compares characters one by one, so file10 comes before file2 because 1 is less than 2 as a character. Natural sort treats runs of digits as whole numbers, ordering file2 before file10 the way a person would expect. Enable the natural sort option whenever your lines contain numbered names like chapters, versions, or filenames.
How does numeric sorting handle lines that are not numbers?
Numeric mode reads the number at the start of each line, ignoring leading spaces, and sorts by that value, so both 3 and 3.14 or -2 are handled correctly. Lines that do not start with a number keep their relative order and are placed after all numeric lines. This is useful for sorting prices, measurements, or ranked lists.
Does remove duplicates respect the case-insensitive option?
Yes. When both options are on, Apple and apple count as the same line and only the first occurrence is kept. With case-insensitive off, they are treated as different lines. The trim option works the same way: if trimming is on, lines that differ only by surrounding spaces are considered duplicates.
Is my text uploaded anywhere when I sort it?
No. The sorting runs entirely in your browser with JavaScript — nothing you paste is sent to a server, stored, or logged. You can even load the page, disconnect from the internet, and keep sorting. That makes it safe for names, email lists, or any private data.
How large a list can I sort?
Because everything happens locally, the limit is your device’s memory rather than a server quota. Lists with tens of thousands of lines sort in a fraction of a second on a typical phone or laptop. For very large files (hundreds of thousands of lines) the page stays responsive, though the textarea itself may scroll slowly on older devices.

About this tool

This tool sorts the lines of any text you paste into it. Each line is treated as one item, so it works for word lists, names, email addresses, filenames, CSV columns, shopping lists, or lines of code. Six modes are available: A to Z, Z to A, numeric, by line length, random shuffle, and a simple reverse of the current order. The output updates live as you type or change a setting, and a line count before and after shows exactly what happened — useful when duplicate removal is on.

Sorting happens entirely in your browser. The page splits your text on line breaks, builds a comparison key for each line according to your options, and orders the lines with the standard JavaScript sort using a locale-aware collator. Nothing is transmitted or stored, so the tool is safe for confidential lists and works offline once loaded. Natural sort uses numeric collation, which compares digit runs as whole numbers so file2 correctly comes before file10 — plain character-by-character sorting would reverse them.

Three options refine how lines are compared. Case-insensitive puts apple next to Apple instead of grouping all capitals first. Trim before compare ignores leading and trailing spaces, which matters for lists copied from spreadsheets where cells often carry invisible whitespace. Remove duplicates keeps only the first occurrence of each line, judged by the same rules the sort uses, so you can deduplicate and alphabetize an email list in one pass.

A few practical tips: use numeric mode for prices or scores, since alphabetical order would place 100 before 20. Use sort by length to find the shortest or longest entries in a dataset. Random shuffle is handy for picking a fair order for presentations or raffles — press Shuffle again for a new arrangement. When you are done, copy the result or download it as a plain .txt file.

Related tools