Text Tools

Sort Lines

Put a list in alphabetical or natural order, ascending or descending. Optionally ignore case, trim each line or remove blank lines, then copy or download the result privately.

Your content stays on your device Free, with no account
A little order for your list Sorted on your device
Up to 200,000 text units and 20,000 lines. Duplicate entries are kept.

Ready. Choose your options and sort the list.

Sorting uses English collation. Ties keep their original order in both directions. Natural sorting compares digit groups, not mathematical values.

A FEW SIMPLE STEPS

How to use Sort Lines

  1. Paste your list with one entry per line. The original text remains in the input.
  2. Choose ascending or descending order, then alphabetical or natural comparison. Optionally ignore case, trim each line or remove blank lines.
  3. Select Sort lines and review the result. Duplicate entries remain, and entries with equal sort values keep their original order.
  4. Copy or download the sorted text as TXT. Editing an input or option clears the old result.
PRIVATE BY DESIGN

Why use this tool?

Your list is sorted on your device with no uploads, accounts, dependencies or browser storage. You can review the result beside the original, and duplicates are preserved so sorting does not silently remove entries.

Tool inputs stay in your browser. Only your theme preference is saved on this device.

A few things worth knowing

How does natural sorting differ from alphabetical sorting?

Alphabetical mode compares text using English collation. Natural mode also compares digit groups numerically, so item 2 comes before item 10. This is not a mathematical number sorter: signed numbers, decimals, fractions and scientific notation are not interpreted as complete numeric values.

Are duplicate entries removed?

No. Sorting preserves duplicate entries. Entries that compare equally keep their original relative order, even in descending order. Use Remove Duplicate Lines if you want to deduplicate a list.

What does Ignore letter case do?

It ignores uppercase/lowercase differences in sorting while retaining the original spelling. Accents still matter. English Unicode collation can treat some differently encoded strings as equivalent, in which case their original relative order is kept. Exact ordering can vary slightly with browser collation data.

Does trimming change my list?

Yes. Trimming removes whitespace at the start and end of every output line before sorting. Interior spacing remains unchanged. Without trimming, whitespace stays in place and participates in sorting. Remove blank lines drops empty and whitespace-only entries.

How are final line breaks counted?

An ending newline terminates the final entry and is not counted as an extra blank entry. If the input ends with a newline and at least one entry remains, the output retains an ending newline. CRLF and CR endings normalize to LF. This matches our Remove Duplicate Lines tool.

What are the limits?

The tool accepts up to 200,000 UTF-16 text units and 20,000 line entries. Some emoji use multiple units. Oversized input remains untouched while processing is unavailable. Clear removes the input and result. Text is not saved when you leave or reload the page.