Sort Lines

Sort lines alphabetically — A→Z by default, Z→A on second click. Case-insensitive comparison. Works on any line-separated text.

Example: banana apple cherryapple banana cherry

Sorts lines alphabetically using locale-aware comparison — accented letters cluster correctly with their unaccented forms, and embedded numbers sort numerically ("file2" before "file10"), not as raw strings. Default order is A→Z.

Useful for organising any line-separated list — names, email addresses, URLs, words, file names, log entries.

Use cases

Alphabetising name lists

Member rosters, contact lists, attendee names — sort once, paste back into your document.

Sorting URLs or domains

Group related domains together by paste-and-sort. The locale-aware comparison handles country TLDs sensibly.

Sorting code-style identifiers

Variable names, function names, file paths — natural sort handles "item1, item2, item10" correctly.

Reverse-alphabet exercises

Run forwards then reverse the lines (using Reverse Line Order) for Z→A.

Vocabulary or glossary work

Build an index of terms by pasting your draft and sorting; spot duplicates and gaps immediately.

Frequently asked questions

Is the sort case-sensitive?

No — case-insensitive by default. "Apple" and "apple" are sorted as equal. For case-sensitive sorting, paste through a locale-aware sort in your terminal.

How are numbers sorted?

Naturally — "item2" comes before "item10". Pure-string sort would put "item10" first because '1' < '2'; we use locale-aware natural sort to match human expectations.

How do I sort Z→A instead?

Run sort, then run the result through Reverse Line Order. Two clicks total.

Does it sort accented characters correctly?

Yes — the JavaScript locale-aware comparator uses your browser's collation rules. "café" sorts near "cafe", "über" near "uber".

Embed our tools on your website

Free for any site. No signup. Iframe loads from our servers and stays up-to-date automatically.

📋 Embed the Word Counter

Copy this snippet:

Live preview:

📋 Embed this Sort Lines

Copy this snippet:

Live preview:

Want more options? All embeddable tools →