Skip to content
Lines → Sorted linesText tools

Text Sorter

Sort lines of text A to Z, Z to A, by length, reverse their order or shuffle them. Ignore case and remove duplicate lines. Live result, one-click copy.

About this tool

About Text Sorter

This text sorter puts a list in order the moment you paste it. Each line is one item — names, keywords, email addresses, product codes, CSS classes, anything — and the sorted list appears next to it as you type. Choose how to sort: alphabetical A to Z or Z to A, by line length from shortest to longest or the other way round, reverse the current order (last line first), or shuffle the lines into a random order. Alphabetical sorting follows real language rules rather than raw character codes, so “apple”, “Banana” and “cherry” sort the way people expect and accented letters such as “é” sort next to “e”. Ignore case is on by default, so “apple” and “Apple” are treated as the same word for ordering; switch it off when capital letters should come first. Tick Remove duplicate lines to keep only the first copy of every line that appears more than once, which turns a messy pasted list into a clean set of unique items in one go. Duplicates must match exactly, including capital letters and spaces, so “Delhi” and “delhi ” are kept as two different lines. When the result looks right, click Copy result and paste it wherever you need it. Nothing is sent to a server; the sorting happens in your browser, so private lists like customer emails stay on your device. One thing to know: numbers are sorted as text, character by character, so “10” comes before “2”. If you are sorting numbered items, write them with the same number of digits (02, 10) or use the length sort, which puts shorter numbers first.

Text Sorter tool

Lists people sort

From messy to ordered in a paste

Names and attendance lists

Put a class list or guest list in alphabetical order.

ExamplePaste 60 student names, choose A → Z, copy into the register.

Clean an email list

Lists merged from several sources contain repeats.

ExampleTick Remove duplicate lines, then sort A → Z before importing.

Keyword lists

SEO and ad keyword exports are easier to review in order.

ExampleSort 300 keywords by length to find long-tail phrases.

Code and config

Sorted imports, CSS properties and .gitignore lines are easier to diff.

ExampleSort a list of npm package names before adding them to docs.

Random order

Pick an order for presentations, a quiz or a draw.

ExampleShuffle team names to decide who presents first.

Spreadsheet column

Copy one column out of Excel or Sheets and sort it.

ExamplePaste a column of city names, sort, paste back.

Sorting tips

Get exactly the order you want

Numbers sort as text

“10” comes before “2”. Pad numbers with zeros (02, 10) or use Short → Long to order them.

Trim spaces first

A line with a trailing space is not a duplicate of the same line without it. Clean spaces first.

Open Text Space Remover

Case-sensitive duplicates

Remove duplicates matches exact text, so “Delhi” and “delhi” both stay.

Number the result

Add 1, 2, 3 in front of each sorted line.

Open Line Numbering

Only remove repeats?

To de-duplicate without changing the order, use Remove Duplicates.

Open Remove Duplicates

Empty lines go first

Blank lines sort to the top in A → Z. Delete them or remove duplicates to keep just one.

Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed Text Sorter and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 22 November 2026

Answers and guidanceFrequently Asked Questions
How do I sort a list alphabetically?
Paste the list with one item per line and keep Alphabetical (A → Z) selected. The sorted list appears straight away; click Copy result.
Why does 10 come before 2?
Lines are sorted as text, one character at a time, and “1” comes before “2”. Write numbers with the same number of digits (02, 10), or sort by line length.
What does Ignore case do?
With it on, capital and small letters are treated the same for ordering. Off, the order also takes letter case into account.
How does Remove duplicate lines work?
It keeps the first copy of every line and drops later exact repeats. Lines must match exactly, including capitals and spaces.
Can I shuffle a list randomly?
Yes. Choose Random shuffle; each change gives a new random order, handy for picking presentation order or quiz questions.
Does it sort words within a line?
No, it sorts whole lines. Put each word on its own line first if you want to sort words.
Is my list uploaded?
No. Sorting runs in your browser and nothing is sent to a server.
How many lines can I sort?
Tens of thousands of lines sort instantly on a normal computer; the limit is your browser’s memory.
More tools for your workflowRelated Tools

Remove Duplicate Lines

Remove duplicate lines or comma-separated items from any list. Ignore case, trim spaces, drop empty lines, sort A to Z and download the clean list.

Line Numbering Tool

Add numbers, letters, Roman numerals or bullets to lines, or remove numbering from a list. With your own text before and after.

Clean Text & Space Remover

Remove extra spaces, blank lines, invisible characters, HTML and broken lines from copied text. See what is hidden in it, and clean it in one tap.

Reverse Text

Reverse text three ways: flip the letters, reverse the order of words, or reverse the order of lines. Live result and one-click copy.

1 / 3
Browse all text tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.