MADE TO BE USEFUL. A growing collection of free tools for everyday work.
TEXT TOOL / SORTING

Free Online Line Sorter

Sort lines of text alphabetically, by length or by number. Clean up lists by trimming spaces and removing blank lines and duplicates in the same step.

Paste your list and the sorted result updates as you type. Everything is processed in your browser.

✓ Free to use · No signup required · Processed in your browser
Line Sorter workspace
PASTE LINES · CHOOSE A SORT ORDER · COPY OR DOWNLOAD
● READY TO USE
Paste your lines — they are sorted as you type.
LINE SORTER WORKSPACEMOSANKIT / TEXT TOOLS
THE BASICS

What Is a Line Sorter?

A line sorter puts each line of your text into a new order. It is the quickest way to alphabetise a list of names, tidy a column copied from a spreadsheet, or put numbers in order without opening a spreadsheet at all.

Sorting is natural-aware, so file2 comes before file10, and numbers inside lines can be sorted by their value.

BUILT FOR THE JOB

Key Features of MoSanKit Line Sorter

A↓

Alphabetical Order

Sort A to Z or Z to A, with or without case sensitivity, and with natural number ordering.

↕

Sort by Length

Put the shortest or longest lines first.

#

Numeric Sorting

Sort by the first number in each line, including values like 1,500.

⇅

Reverse or Shuffle

Flip the current order, or shuffle lines randomly for fair draws.

≡

Clean-up Options

Trim spaces, drop blank lines and remove duplicates while you sort.

◎

Private by Design

Your lists never leave your browser.

QUICK AND SIMPLE

How to Sort Lines of Text

01 / PASTE

Paste your lines

Put one item on each line.

02 / ORDER

Choose a sort order

Pick alphabetical, length, numeric, reverse or shuffle.

03 / CLEAN

Set clean-up options

Trim, drop blank lines or remove duplicates.

04 / COPY

Copy the result

Copy it or download a text file.

MADE FOR EVERYDAY WORK

Who Can Use This Tool?

Writers and EditorsAlphabetise glossaries, references and lists.
DevelopersSort config values, imports and log lines.
MarketersTidy keyword and email lists.
TeachersOrder student names and quiz answers.
Data AnalystsQuickly order a copied column of values.
StudentsOrganise notes and bibliographies.
GOOD TO KNOW

A few things, answered.

Quick answers about using the MoSanKit Line Sorter.

By default it is not, so "apple" and "Apple" sort together. Turn on Case-sensitive to put capitals first.

Each line is sorted by the first number found in it. Lines without a number are placed at the end.

Yes. Alphabetical sorting uses natural order, so item2 comes before item10.

Yes. Tick Remove duplicates and repeated lines are dropped, ignoring case unless Case-sensitive is on.

It uses your browser's secure random number generator, so every order is equally likely.

No. Everything is processed in your browser.

Put any list
in order.

Explore more free text tools from MoSanKit.

Explore All Tools ↗