Skip to content
Text Runs offline

Sort Lines

Sort lines alphabetically, numerically, by length or at random.

Input

0 chars

Output

0 chars
Ctrl

Questions

What does natural sort do differently?

It reads runs of digits as numbers rather than characters, so file2 sorts before file10. Plain alphabetical sorting compares character by character and puts file10 first, because "1" precedes "2". Natural sort is almost always what you want for filenames and version strings.

How are non-English characters ordered?

Using the browser's Intl.Collator, which applies locale-aware rules. That means å sorts alongside a in most locales rather than being pushed to the end as a naive code-point comparison would.

Open Word Counter

Word Counter

Count words, characters, sentences and reading time.

Text
Open Case Converter

Case Converter

Convert text between camelCase, snake_case, kebab-case and more.

Text