Words & text

Text sorter

Put your list in order. Sort lines, tidy spaces and remove duplicates.

How it works

Text sorter

Paste one entry per line, choose sorting and cleanup options, then copy the result. Sorting follows the selected page language.

How to use this tool

  1. Paste one item per line and choose ascending or descending order. Select trimming, empty-line removal or duplicate removal only when wanted.
  2. Sort, inspect the result and copy it. Restore recovers the original captured before sorting; Clear removes the current text.

Understanding the result

Sorting uses the selected page language's collation rules. It is alphabetic, not numeric: a line starting with 10 can precede 2. Case sensitivity also controls duplicate comparisons.

Worked examples

z, b, a → a, b, z

2, 10 → 10, 2

a, a, b → a, b

Good to know

Maximum input: 200,000 UTF-16 code units.

Trimming can remove intentional leading or trailing spaces. Deduplication removes later matching lines under the selected case rule. Input is limited to 200,000 UTF-16 code units and is not saved after reload.

A few quick answers

Can I sort a spreadsheet column numerically?

This version orders text. For numeric order, use a spreadsheet's numeric sort rather than assuming alphabetic order compares quantities.

Sources and implementation

Implementation for this tool: Intl.Collator · numeric: false

Maintained by Chpl Limited · Updated:

A little break from ads.

Choose to view a rewarded ad and get 24 ad-free hours in this browser. No payment or account required.

There are no rewarded ads available right now. All tools are still free to use.

Optional advertising is off. If enabled later, it will only load after your choice. Tool inputs are never sent to analytics.