Skip to content
OddsockLocal
Local
Source text

Formatting

5 wordsRuns in this browser. Nothing is uploaded.

How to use

  1. Paste one item per line.
  2. Leave Operation on natural sort for row2 before row10.
  3. Switch to ascending, descending, or length if that is the order you actually need.
  4. Copy the list. The lines themselves are not rewritten.

What is Sort lines?

Alphabetical order and numeric order disagree the moment a line contains a number. In plain character order, row10 comes before row2, because the character after “row1” decides it. Natural sort, which is what this page opens on, compares the number as a number, so row1, row2, row10.

Read more

The Operation menu still offers the other orders. Ascending is English alphabetical order without the numeric trick: row1, row10, row2. Descending is that order flipped: row2, row10, row1. Length sort orders by the number of characters, shortest first, and keeps the original relative order when two lines are the same length. “so”, “dryer”, “odd socks” become so, dryer, odd socks.

Case uses ordinary English comparison. “A” comes before “b”. “row2” comes before “Row2” on the natural sort of a mixed list, and both come before “row10”. A one-line paste such as “Odd socks in the dryer.” has nothing to reorder. Ignore case does not affect sort. It is only read while deduplicating.

Use cases

  • A developer sorting file names so episode 2 does not land after episode 10.
  • A librarian who wants true alphabetical order and switches off the natural comparison.
  • An editor sorting headings by length to find the ones that will wrap.
  • A teacher ordering a class list where “A” should precede “b”.
  • A release manager putting version-like labels in descending alphabetical order.

row10, row2, and row1 on natural sort

row10 row2 row1 Operation left on natural sort.

row1 row2 row10 Alphabetical order of the same three lines would be row1, row10, row2.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

The number inside the line is compared as a number. Alphabetical order compares characters, so row10 comes first because 1 comes before 2.