Sort Text Lines Alphabetically

Paste a list to sort lines alphabetically, numerically, or by length, in ascending or descending order. Optionally remove duplicates and blank lines in the same pass — instantly and entirely in your browser.

 

Sort a list alphabetically or by number

Put any list in order without leaving your browser. Alphabetical mode sorts lines A–Z (or Z–A) using a locale-aware comparison, so accented characters land where a reader expects. Numeric mode reads the number at the start of each line and orders by value — the right choice for versions, prices, or quantities, where a plain alphabetical sort would wrongly place "10" before "2". Line-length mode arranges lines from shortest to longest.

Clean while you sort

Sorting is often step one of tidying a list, so the cleanup options run in the same pass: Ignore case for a true case-insensitive order, Remove duplicates to keep one of each line, and Remove blank lines to drop empty gaps. Combine them to turn a messy paste into a clean, ordered set in one step.

Instant and private

The sort runs on your device the moment you type or change an option — no upload, no waiting, nothing stored. If you only need to strip repeats without reordering, the remove duplicate lines tool preserves the original order, and reverse text can flip the line order when you need the opposite of a sort.

Frequently asked questions

How do I sort text alphabetically?

Paste your list, keep the type on "Alphabetical", and it sorts the lines A–Z instantly as you type. Switch to descending for Z–A. Sorting happens line by line, so each line stays whole and only their order changes.

What is the difference between alphabetical and numeric sorting?

Alphabetical sorting compares text character by character, which puts "10" before "2" because it reads the "1" first. Numeric sorting reads the number at the start of each line and orders by value, so 2 comes before 10. Use numeric for lists of numbers, versions, or quantities.

Can it remove duplicates while sorting?

Yes. Turn on "Remove duplicates" to keep just one copy of each line as it sorts, which is a common combination when cleaning a list. You can also remove blank lines and ignore case in the same pass.

Does sorting ignore capital letters?

Only if you want it to. By default an uppercase "A" and lowercase "a" sort near each other but capitals may group first; enable "Ignore case" for a true case-insensitive A–Z order where capitalisation is disregarded entirely.

What does sort by length do?

Sort by length orders the lines from shortest to longest (or longest to shortest in descending mode) based on how many characters each line contains. It is useful for finding outliers, tidying lists visually, or prioritising short entries.

Is my list uploaded anywhere?

No. All sorting runs locally in your browser with no network requests, so your text never leaves your device and nothing is stored. Need to remove repeats only, without sorting? Use our remove duplicate lines tool.