Jump to a tool

Lists and comparison

Sort Lines

Put a pasted list into the exact order people or software expect.

Processed locally in your browser. Your data is never uploaded or stored.
Processed locally in your browser. Your data is never uploaded or stored.

Ready

Input0 lines · 0 characters
Output0 lines · 0 characters
OptionsAdjust how this tool processes your text
Sort Lines options
Press Ctrl/Cmd + Enter to process

What this tool does

A focused tool for a specific cleanup job

Sort Lines offers language-aware alphabetical ordering, natural ordering for names with numbers, strict numeric modes, and length-based sorting. Duplicate removal can run before the sort.

Common use cases

  • Order filenames with embedded numbers
  • Rank numeric values
  • Alphabetize keywords or categories
  • Find the shortest or longest entries

How to use Sort Lines

  1. Paste one value per line.
  2. Choose the sort mode and direction.
  3. Set case sensitivity and optional deduplication.
  4. Review the order and copy or download it.

Options explained

  • Natural sort places item2 before item10.
  • Numeric sort parses each trimmed line as a number.
  • Length modes count Unicode string units used by the browser.
  • Case-insensitive ordering uses a locale-aware collator.

Example

Before
item10
item2
item1
After
item1
item2
item10

Edge cases and limitations

  • Non-numeric lines sort after valid numbers in numeric modes.
  • Equal values retain stable input order in modern browsers.
  • Locale rules can vary slightly by browser language.

Questions

Sort Lines FAQ

What is natural sorting?

It compares number-like parts as numbers, so item2 comes before item10.

Can duplicates be removed while sorting?

Yes. Enable duplicate removal before the selected sort runs.