Skip to main content

Sort a list

Reorder the lines of a list in seconds with alphabetical and numeric modes, then copy or reuse the sorted result; repeated values are kept.

  • Clipboard
Automate

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Was this tool useful?

How does this tool work?

Sort a list line by line in your browser, alphabetically or numerically, in ascending or descending order. Sorting keeps repeated values: it does not remove duplicates.

Alphabetical sorting uses a language-aware comparison that reads numbers inside text, so “item 2” comes before “item 10”. Capitals and accents do not break ties: “Élise” and “elise” rank equally. Numeric sorting compares the values read as numbers. Choose the mode that matches your data and check lines that mix text and figures. Empty lines are ignored. The result only reorders lines; it does not fix typos. To pick the right mode, start from the question the list should answer. For names, titles or references, alphabetical order makes things easy to find. For measurements or quantities, numeric mode stops digits being treated as mere characters. A reference such as “batch 12” is not a quantity, though: keep that kind of identifier in alphabetical mode and check the order you get. Punctuation and spaces can affect the ranking. If the list mixes languages, try a few representative values first. Sorting does not replace prior clean-up: “Paris”, “paris” and “Paris” preceded by a space remain separate entries. Likewise, a sorted list is not necessarily a list of unique values. If you are preparing an export, first decide whether duplicates mean something, then use the duplicate remover separately if needed. To compare two results, keep the same sorting method. Finally, before copying the result, check the first and last items and a few special cases: negative values, decimals, alphanumeric identifiers or accented names. These quick checks stop an unexpected order from being mistaken for a data error.

How to use this tool

  1. Enter the lines

    Paste one value per line into the input field.

  2. Choose the mode

    Pick alphabetical or numeric sorting, ascending or descending.

  3. Check the output

    Review any ambiguous lines and copy the reordered list.

Use cases

Ordering references

Sort references that contain numbers so you can find an item quickly.

Ranking measurements

Use numeric mode to order values by size rather than by how they are written.

Preparing an inventory

Organise entries before copying them into a document, keeping any duplicates.

Examples

Ascending numeric sort

Input

10
2
3

Result

2
3
10

Decimals, negatives and non-numeric values

In ascending numeric mode, decimal points and a space between thousands are recognised. “n/a” is not a number, so it goes to the end.

Input

10
2.5
n/a
-3
1 250

Result

-3
2.5
10
1 250
n/a

Tips and best practices

  • Alphabetical sorting recognises numbers inside text: test your references on a sample first.
  • To remove duplicates, use the dedicated tool before or after sorting.
  • In numeric mode, “12 kg” is not read as a number: remove units before sorting to rank such values by size.

Sources and references

Frequently asked questions

Does alphabetical sorting put 10 before 2?

No. It reads numbers inside text in their natural order: “2” comes before “10” and “item 2” before “item 10”. Still, check unusual formats.

Are duplicates removed?

No, sorting does not deduplicate the list.

Can I sort numbers?

Yes. Both numeric modes read integers, decimals written with a point or a comma, negative numbers and thousands separated by a space (1 250). Thousands separators follow the page convention: 1,250 and 1 250 both mean 1250, 1,250.50 is read correctly, and a lone point stays decimal (1.250 means 1.25). Lines that are not numbers are grouped at the end, in alphabetical order.

Are empty lines kept?

No, they are ignored.

Does sorting fix input errors?

No. Check spaces, formats and values before reusing the list.

Related tools

Tools similar or complementary to this one.

Similar tools

Compare two lists to find the items they share and the ones that differ.

Text & writingUse this tool

Merge two lists into a single set of lines ready to copy or reuse.

Text & writingUse this tool

Split a long list into groups of a fixed size, based on the number of items you choose.

Text & writingUse this tool