Text tool / 100% free

Sort Lines

Sort lines of text alphabetically or numerically, ascending or descending, with optional duplicate removal. It is a quick way to clean lists before pasting them into docs, spreadsheets, or code. It is free, needs no account, and adds no watermark to your result.

Built for: sort lines

Loading text tools…

When you need this

What people use it for.

Alphabetizing a list of names or values
Sorting numeric IDs before comparison
Removing duplicate lines from pasted text
How it works

What happens to your file.

The input is split into lines and sorted. Sort by text uses natural order, so item2 comes before item10 and capitals do not jump ahead; sort by number reads the number in each line, such as 10 apples, $1,200 or -3, and puts lines without one after them; sort by length orders by number of characters; and random shuffles the list. Blank lines are left out rather than sorted to the top, and duplicates can be removed in the same pass.

Where it stops: Sorting changes order but not meaning. If line order is meaningful, keep a copy of the original before sorting.

What this tool includes

Everything you need, without a paywall.

Free Pro export naming included
Alphabetical sort
Numeric sort
Ascending/descending
Optional dedupe
Questions

Common questions.

Can it sort numbers correctly?

Yes. Choose sort by number and 10 comes after 2, even when the number is part of a line such as 10 apples or $1,200.

Can it shuffle a list?

Yes. Choose random to put the lines in a random order, for a draw or a quiz.

Can it remove duplicates?

Yes. Enable duplicate removal during sorting.

Does it sort paragraphs?

This tool sorts lines. Use Duplicate Line Remover for paragraph-focused cleanup.

Related free tools

You might also need.