Sort lines

Sort lines by locale, exact decimal value or natural order, with an explicit processing language and whitespace options.

Each input: 128 KiB, 65,536 UTF-16 units and 5,000 lines; 256 KiB combined. Full output plus parts: at most 512 KiB, with 5,000 lines in the full text and each part, and 100 parts; 5-second deadline. Output converts CR/CRLF into LF. The original remains in the field.

This selection controls comparison, letter case and cluster boundaries; it does not change the site interface language.

Numeric mode accepts ASCII digits, an optional sign and a decimal point, up to 256 characters per number; no exponents or grouping separators. Duplicates and comparison ties retain their order.

How to use

Paste lines, select the text language, sort mode and direction. Explicitly choose case-insensitive comparison, trimming or dropping empty lines if needed. Process, review, then copy or download TXT.

Try an example

With English and ascending natural order, file10 followed by file2 becomes file2 followed by file10; comparison ties retain their original order.

Support & limits

Locale and natural sorting use Intl.Collator with the selected language. Numeric mode compares decimal values exactly without Number conversion: an optional sign, decimal point and at most 256 characters; no exponent or grouping separators. CR and CRLF become LF; the original input fields remain unchanged.

Common questions

Does sorting remove duplicate lines?

No; sorting retains duplicates. Dropping empty lines and trimming spaces are separate options, both off by default.

Related tools