Tool workspace

Text Sorter

Input

Sort text lists into a more useful order with this free online Text Sorter. Arrange one item per line alphabetically, numerically, or by line length. You can also reverse the current order without sorting the entries.

Input

Output

Loading tool

Loading tool

Text Tools

Text Sorter

Sort text lists into a more useful order with this free online Text Sorter. Arrange one item per line alphabetically, numerically, or by line length. You can also reverse the current order without sorting the entries.

Whether you are organizing names, cleaning up a keyword list, or arranging numeric values, the tool helps you produce a consistent list without manually moving each line.

Quick guide

How to use

Enter or paste your list into the input area. Use one item per line.

Select an ordering method: alphabetical, numeric, line length, or reverse.

Choose whether sorting should be case-sensitive or case-insensitive.

Enable any cleanup options you need, such as trimming line edges, removing blank lines, or keeping unique lines.

Review the sorted output and the line counts.

Copy the result or download it as a TXT file.

You can load the example to see how the sorting options work, or clear the input to start again.

Details

About this tool

Sort text lists into a more useful order with this free online Text Sorter. Arrange one item per line alphabetically, numerically, or by line length. You can also reverse the current order without sorting the entries.

Whether you are organizing names, cleaning up a keyword list, or arranging numeric values, the tool helps you produce a consistent list without manually moving each line.

Sort text in different ways

Choose the ordering method that fits your list:

Alphabetical (A to Z): Sort lines in ascending alphabetical order.

Alphabetical (Z to A): Sort lines in descending alphabetical order.

Numeric (ascending): Arrange entries from the smallest parsed number to the largest.

Numeric (descending): Arrange entries from the largest parsed number to the smallest.

Shortest line first: Put lines with fewer characters before longer lines.

Longest line first: Put longer lines before shorter ones.

Reverse current order: Flip the existing sequence, from last line to first, without sorting the content.

Numeric sorting is different from alphabetical sorting. For example, alphabetical sorting may place 100 before 20 because it compares the text characters. Numeric sorting compares parsed numbers, so 20 comes before 100. When parsed numeric values are equal, the text is used as a tie-breaker.

Optional ways to clean your list

You can adjust the input before sorting:

Trim line edges: Remove spaces and other whitespace at the beginning and end of each line.

Remove blank lines: Exclude empty lines from the result.

Keep unique lines: Remove repeated entries so each matching line appears only once.

Case handling: Choose case-insensitive or case-sensitive sorting where applicable.

These options are useful when lists contain inconsistent spacing, empty entries, or repeated names and keywords. If you keep duplicate removal disabled, repeated lines remain in the sorted result.

Example: alphabetical vs. numeric sorting

Consider this list:

100

20

3

Apple

Banana

Alphabetical ascending order compares entries as text. Numeric ascending order compares entries that can be parsed as numbers, with text used to break numeric ties. The two methods can therefore produce different results.

For a list of numbers, numeric sorting gives:

3

20

100

For names or keywords, alphabetical sorting is usually the more appropriate choice.

Understand the line counts

The tool displays counts for the input, output, and removed lines. These figures help you see how cleanup options affect the list.

For example, removing blank lines and duplicate entries can make the output shorter than the original input. The removed-line count shows how many lines did not remain in the final result.

Common uses

The Text Sorter can help with everyday text organization, including:

Sorting contact names or lists of people.

Putting SEO keywords into alphabetical order.

Arranging numeric entries from low to high or high to low.

Ordering labels or descriptions by line length.

Reversing a list when you need the opposite sequence.

Removing repeated entries and unnecessary blank lines.

Practical inputs

Examples JSON

Example: alphabetical vs. numeric sorting

Consider this list: 100 20 3 Apple Banana Alphabetical ascending order compares entries as text. Numeric ascending order compares entries that can be parsed as numbers, with text used to break numeric ties. The two methods can therefore produce different results. For a list of numbers, numeric sorting gives: 3 20 100 For names or keywords, alphabetical sorting is usually the more appropriate choice.

Help

Frequently asked questions

What does the Text Sorter do?

It arranges a list of text lines alphabetically, numerically, by line length, or in reverse order. It also offers optional cleanup settings.

What is the difference between alphabetical and numeric sorting?

Alphabetical sorting compares entries as text. Numeric sorting compares parsed numbers, so values such as 3, 20, and 100 are ordered by their numeric value rather than their first character.

What does case-sensitive sorting mean?

Case-sensitive sorting takes letter case into account when comparing text. Case-insensitive sorting treats uppercase and lowercase versions of a letter as equivalent for sorting.

Can I remove duplicate lines?

Yes. Enable the unique-lines option to retain only one occurrence of each matching line.

Can I keep blank lines?

You can choose whether blank lines are removed before the result is produced.

Can I download the sorted list?

Yes. Copy the result to your clipboard or download it as a TXT file.

Can I sort a spreadsheet by multiple columns?

No. This tool sorts plain text arranged one item per line. It does not import spreadsheets or sort records by multiple custom columns.