Sort text alphabetically

Sort the lines of your text from A to Z or Z to A. Numbers can be sorted the human way (2 before 10), and you can ignore case and remove duplicates.

Order
Sort by

How it works

  1. Paste your text

    Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.

  2. Instant result

    The result appears as you type. Change the options and see straight away what changes.

  3. Copy or download

    Copy the result with one click, save it as a file or use it as input for a next step.

Sorting options

  • Order: A → Z or Z → A.
  • Sort by: Alphabet, Alphabet with smart numbers or Length. With smart numbers, item 2 comes before item 10; with plain alphabetical order item 10 comes first, because 1 sorts before 2.
  • Ignore case: apple and Apple are treated as equal for sorting.
  • Remove duplicate lines and leave out empty lines.

Accented letters sort next to their plain versions, so Éclair lands with the E's.

Related

To only remove repeated lines, use remove duplicate lines. For the opposite of sorting, use randomize text; to just flip the order, use reverse lines.

Frequently asked questions

Is the sort text alphabetically free?

Yes. The sort text alphabetically is completely free, with no account, sign-up or usage limit.

Is my text stored?

No. Your text is processed in your browser and is not sent to a server or stored.

Is there a maximum length?

No, there is no fixed limit. Very long texts can just be a little slower.