Text & writing ● Local processing

Sort Lines Alphabetically

Sort lines using the browser’s language rules and choose how numbers in text are ordered.

Preparing tool…
Try a small example

Try a small example

Load the fictional example in a cleared form. Check the options, run the tool if needed, and compare the result below.

Sort lines using the browser’s locale, ignoring case and many accent differences. Choose text order (item10 before item2) or numeric order (item2 before item10). Equivalent lines retain their input order. Paste one item per line, choose whether digits within text should sort as text or as numbers, then select Sort lines. Text order puts item10 before item2; numeric order puts item2 before item10. Both modes ignore letter case and follow the browser’s language rules. Blank lines move to the top, ties keep their original order, and line text stays unchanged. Accent ordering can vary by locale. Blank lines sort to the top; numeric order only changes how digit sequences inside lines are compared.

Lines to sort

item2
item10
item1

Expected output

item1
item10
item2

The example is unavailable until the tool is ready.

Text is processed in your browser.

✓ Local processing✓ No account✓ Inputs processed here✓ Free

Quick answer

Sort lines using the browser’s locale, ignoring case and many accent differences. Choose text order (item10 before item2) or numeric order (item2 before item10). Equivalent lines retain their input order.

The page and its assets load from the site; this operation uses your entered values only in this browser and does not send them to a calculation endpoint.

How to use it

Paste one item per line, choose whether digits within text should sort as text or as numbers, then select Sort lines. Text order puts item10 before item2; numeric order puts item2 before item10. Both modes ignore letter case and follow the browser’s language rules. Blank lines move to the top, ties keep their original order, and line text stays unchanged.

Limits

Accent ordering can vary by locale. Blank lines sort to the top; numeric order only changes how digit sequences inside lines are compared.

Frequently asked questions

How are lines compared?

The browser’s locale rules ignore case and many accent differences. Some locales sort accented letters as distinct letters. Choose text order, where item10 comes before item2, or numeric order, where item2 comes before item10.

What happens to blank lines and ties?

Blank lines move to the top. Lines that compare equally keep their input order; the line-break sequence and final newline remain intact.

Further guidance

Clean a list without changing its values

Sources and references

These references document the cited standard or browser API; they do not validate the tool’s output.