Sort Text Alphabetically

Sort any list or text line by line: from A to Z, by length or randomly, in one click.

Sort mode

Lines: 0

What does sorting a text mean?

Sorting a text means rearranging its lines by a criterion: alphabetical order, the length of each line or a random order. The result is a structured list that is easy to scan.

A sort text tool automates that work: you paste the list, pick a mode and instantly get the sorted version, with nothing to rewrite by hand.

Everything happens in your browser, with nothing sent to a server. It is the fastest way to sort a list from any text document.

Why sort a list?

Sorting text is useful whenever you work with lists. These are the most frequent use cases.

📇

Lists and directories

Sorting text alphabetically leaves a list of names, cities or products clean and easy to scan.

📊

Data and references

Sorting a list of keywords, URLs or bibliographic references helps you find each entry at a glance.

📚

Study and organization

Sorting a vocabulary or a syllabus alphabetically makes review easier, and random order helps create exercises.

To clean up repeats, see the remove duplicate lines tool, or read our blog post length guide.

How to sort a text step by step

1

Paste the text

Copy your list or text and paste it into the top box, with one item per line.

2

Choose the mode

Select sort A-Z, Z-A, by length or random, and set whether to ignore case or remove duplicates.

3

Copy the result

The sorted text appears instantly. Copy it or download it as a .txt file.

The sort modes explained

Alphabetical A-Z and Z-A

The A-Z mode sorts the lines from A to Z, the most common order for lists of names or words. The Z-A mode sorts them the other way, from Z to A.

By length

The by-length mode sorts the lines from the shortest to the longest. It is useful for spotting abnormally long or short entries in a data list.

Random

The random mode shuffles the lines at random. It works for raffles, mixing exam questions or quickly creating variations of a list.

Accents and locale-aware ordering

A naive sort places accented characters after the plain alphabet, which breaks multilingual lists. This tool uses locale-aware comparison instead.

That means accented vowels are sorted next to their base letter, and language-specific letters keep their proper place in the alphabet, just as a native speaker would expect.

Example: "café" sorts right next to "cafe" instead of being pushed to the end of the list.

Frequently asked questions

Is the sort text tool free?
Yes, sorting text is 100% free with no usage limit. You can sort as many lists as you need, without signing up. Everything runs in your browser, with no cost and no locked features.
How are accents handled when sorting?
The tool uses locale-aware comparison, so accented characters are sorted next to their base letter rather than at the end. This keeps multilingual lists in a natural reading order.
Can I sort while ignoring case?
Yes. Enable the "Ignore case" option so that "Madrid" and "madrid" sort together. Without it, the comparison distinguishes uppercase and lowercase.
Can I remove duplicates while sorting?
Yes. The "Remove duplicates" option deletes repeated lines in the same step as sorting. If you only want to clean up repeats, use the remove duplicate lines tool.
What is the random order for?
Random order shuffles the list at random. It is useful for raffles, shuffling exam questions or quickly generating variations of a list.
Are my texts uploaded to a server?
No. The whole operation happens on your own device and the text is never sent to any server. It is safe to sort lists with confidential or personal data.
How do I copy or download the result?
The result appears instantly in the box below. You can copy it to the clipboard with one click or download it as a .txt file. To count the lines, use the line counter.