Sort lines

Sort text lines A–Z or Z–A with natural number ordering. Keep duplicates and preview the sorted list locally before copying or downloading it.

Processed locally in your browser
Loading tool…

About Sort lines

The line sorter orders a text list using the browser’s locale-aware comparison. Its numeric option treats digit sequences naturally, so item2 can come before item10 instead of being ordered character by character.

Choose ascending or descending order for a quick list cleanup. Sorting does not remove duplicate entries or trim whitespace. Results can differ slightly between browser locales because collation rules are language-sensitive.

How to use Sort lines

  1. Paste a list with one item per line.
  2. Select Sort A–Z for ascending order or Sort Z–A for descending order.
  3. Check number sequences, punctuation and accented words in Output.
  4. Copy or download the sorted list.

Features

  • Ascending and descending line-order modes.
  • Natural comparison of digit sequences within a line.
  • Base-sensitivity collation, which can compare case and accent variants as equivalent.
  • Preserves duplicate lines and the text within each line.

Common uses

  • Ordering labels for a manual review.
  • Sorting numbered names such as file2 and file10.
  • Preparing a copied list for comparison with another list.

Tips

  • Do not use a locale-aware sorted list as a reproducible cryptographic or build-system ordering without verifying the required comparison rules.

Frequently asked questions

Is this the same as byte-order sorting?

No. It uses localeCompare with numeric comparison and base sensitivity. The result is intended for readable lists, not a fixed binary or database ordering.

Are duplicate lines removed?

No. Every input line remains. Remove duplicate lines is a separate tool.

Why do accents or capitals not determine the order I expected?

The comparison uses base sensitivity, which can treat case and accent variants as equivalent. The browser’s collation locale also affects some ordering rules.

Is my text uploaded or saved?

The tool processes the text in this page, on your device. It does not send the input to a conversion service or save it to an account. Advertising and ordinary website requests are separate from this local text processing. Copy or download any result you want to keep before leaving the tool.

Is my input uploaded?

Tools run in your browser. Files, text and results are not uploaded to our servers and are cleared when you leave the tool.

Your privacy comes first

Tools run in your browser. Files, text and results are not uploaded to our servers and are cleared when you leave the tool.

Find your next tool
↑ ↓ · Enter ↵Esc · Close search