ToolsMaxxing

Sort lines

Sort lines alphabetically, by number or length, reverse them, or shuffle at random.

Your files stay on your device

How it works

  1. 1Paste your lines, one item per line.
  2. 2Choose the order.
  3. 3Tick whether to ignore case and remove empty lines.
  4. 4Copy the sorted list.

What the options do

A to Z and Z to A
Alphabetical by your language's rules, so accented letters sort next to their base letter.
Natural
Numbers inside text are compared as numbers, so file2 comes before file10.
Numbers
Sorts by the number at the start of each line. Lines without a number go to the end.
Shortest or longest first
Sorts by the number of characters.
Reverse and Shuffle
Reverse flips the current order. Shuffle gives a random order each time the options change.

Privacy

Your text is processed in your browser and never sent to a server.

Questions people ask

Why does plain A to Z put file10 before file2?

Plain sorting compares character by character, and 1 comes before 2. Choose Natural to compare the numbers by value.

How does it treat accents and other languages?

It uses your browser's locale rules, so é sorts with e. Orders for scripts such as Bangla follow the browser's dictionary order for that language.

Is the shuffle truly random?

It uses a Fisher-Yates shuffle with the browser random generator. That is fair for drawing names, but do not rely on it for security.

Can I sort a CSV by a column?

No. This tool sorts whole lines. Put the column you want to sort by at the start of each line first.

Does it remove duplicates too?

No. Use the Remove duplicate lines tool for that.

Related tools