Text Sorter

Put a list in the right order

Found this useful? Share it

X LinkedIn Reddit WhatsApp

About Text Sorter

The text sorter treats every line of your input as one item and reorders the lines. Pick A to Z, Z to A, or Shortest line first. Alphabetical modes use a natural-order collator for English with base sensitivity, so item2 comes before item10, and apple, Apple and APPLE are considered equal. Equal lines keep their original relative order because the sort is stable. Shortest line first compares length in UTF-16 code units, which means an emoji counts as two, and breaks ties alphabetically. Line endings are normalised, so Windows and Mac line breaks are accepted and the output always uses plain newlines. Empty lines are real lines: they sort to the top in A to Z, and a trailing newline in your input becomes a blank first line in the output. The Remove exact duplicates option runs before sorting and is case-sensitive and whitespace-sensitive, so Apple and apple both survive while two identical lines collapse to one. For example, the lines item10, Item2, apple, Banana sort to apple, Banana, Item2, item10. Input is limited to 500,000 characters per run.

How to use Text Sorter

  1. Paste one item per line into the Your input box.
  2. Choose A → Z (natural order), Z → A, or Shortest line first from the Mode menu.
  3. Tick Remove exact duplicates if repeated lines should be dropped before sorting.
  4. Check the Result box, then press Copy result or Download.

Frequently Asked Questions

Yes for ordering. Apple and apple compare as equal, so they stay in the order you entered them. Case is not ignored for duplicate removal, which only drops lines that are character-for-character identical.

The collator is numeric, so digit runs are compared as numbers instead of character by character. A plain text sort would put item10 first because the character 1 comes before 2.

Choose Shortest line first. Lines are ordered by character count, and lines of the same length fall back to alphabetical order. There is no longest-first option in this tool.

They are kept and sorted like any other line, so they appear at the top of an A to Z result. Clean the text first with the text cleaner if you want them gone.

No. A line with a trailing space is different from the same line without one. Trim each line first if stray whitespace may hide duplicates.

Yes. Input over 500,000 characters is rejected with a message asking you to use less text at a time.