Sort lines while respecting the numbers inside them

Sort lines while respecting the numbers inside them. Built for writers, designers and developers preparing content or an asset before publication.

Sort lines while respecting the numbers inside them. See the result immediately in your browser, with no account, upload or stored data.

How to use

  1. Paste one value per line into the field to prepare your list for natural sorting.
  2. Check that each line corresponds to one item you want to sort and that no empty line slipped into the selection.
  3. Run the natural sort to rank the lines while taking the numbers inside them into account.
  4. Read the result area and check the order you obtained across several lines.
  5. Copy the sorted list, or erase the field for another set of values.

Example

With lines such as File 2, File 10 and File 1, natural sorting should rank them by numeric value rather than by plain text order. Check carefully whether the final order matches your expectation before copying the sorted list into a document or another application.

Input

File 2
File 10
File 1

Output

File 1
File 2
File 10

Limits and formats

Where processing happens

The sort runs in your browser. The entered lines are analysed locally to produce the natural order, and the result appears without being sent or stored. Your lists therefore stay on your device throughout the operation, and no external service is involved.

Frequently asked questions

What is natural sorting?

It is a sort that considers the numbers inside the lines. For example, a line containing 2 can be placed before a line containing 10, unlike a purely alphabetical sort.

Does the sort change my lines?

No. The tool changes the order of the lines, but it does not rewrite their content. You can copy the result and find the same values in a different order, without losing text.

What happens if two lines are equivalent?

The result may depend on the initial order or on the exact comparison. If two lines look very similar, review the output to make sure the final order suits your need before using it.

Tools in the same category