Sort Lines

Sort alphabetically, numerically or by length. Your text never leaves your browser.

Sorting options

Quicker than a spreadsheet

For a short list of names, tags or bullet points, opening Excel or Google Sheets just to sort is overkill. Paste, pick an order and copy. To drop repeats first, run the list through Remove Duplicate Lines.

How this tool calculates

Worked example

Sort the seven lines "10", "2", "1", "B", "a", "나", "가" in ascending order and you get "1 10 2 가 나 a B" with numeric off and "1 2 10 가 나 a B" with numeric on. In Korean collation Hangul comes before Latin letters, and with ignore case off "a" comes before "B". These values come from running this tool's own functions.

Things to know before you use it

The full counting rules and the sources for service limits are on Methods and standards.

Frequently asked questions

Why does "10" come before "2"?

Plain alphabetical sorting compares character by character. Keep "Natural number order" ticked and numbers are compared by value, so item 2 comes before item 10, just like in a file manager.

Are accented letters sorted correctly?

Yes. Sorting uses the Unicode collation rules built into your browser, so é sorts next to e rather than after z.

What happens to lines that are equal?

Lines that compare as equal keep their original relative order (a stable sort).

More text tools