Sort Lines

Sort any list A to Z, Z to A, by number or length, reverse or shuffle.

Runs in your browser. Your files never leave your device.

How do I sort a list of lines alphabetically or by number?

Paste your list into FixDoks's Sort Lines tool and choose an order: A to Z, Z to A, numeric, by length, reverse or shuffle. The result updates instantly in your browser. You can also ignore case, remove empty lines and remove duplicates in the same step, then copy or download the sorted list.

Sort Lines at a glance

InputA list, one item per line
OutputSorted, reversed or shuffled list
ProcessingIn your browser; your files are not uploaded
PriceFree
Works onChrome, Edge, Safari and Firefox on Windows, Mac, Android and iPhone

How to use Sort Lines

  1. Paste your list with one item per line.
  2. Pick a sort order: A to Z, Z to A, numeric, length, reverse or shuffle.
  3. Tick any extras: ignore case, remove empty lines, remove duplicates.
  4. Copy or download the sorted list.

Sort a list the way you need

Paste names, keywords, file names, product codes or any other list, and FixDoks sorts it instantly. Change the order from the drop-down and the result updates straight away.

Sort orders

  • A to Z / Z to A: alphabetical order using your browser's language rules, so accented letters like "é" sort next to "e" instead of after "z".
  • Numbers: low to high / high to low: sorts by the first number in each line. "Item 2" comes before "Item 10", which plain alphabetical sorting gets wrong. Lines without a number go to the end.
  • Length: shortest or longest line first. Useful for finding very long titles or checking short codes.
  • Reverse current order: flips the list upside down without sorting it.
  • Shuffle: puts the lines in random order using your browser's secure random generator. Good for picking a random winner, making quiz question orders or assigning groups.

Extra options

  • Ignore case: "apple" and "Apple" sort together. With it off, the tool still groups them sensibly but separates them by case.
  • Remove empty lines: blank lines are dropped instead of collecting at the top.
  • Remove duplicates: keeps only one copy of each line after sorting.

Alphabetical vs natural order

Alphabetical (A to Z)Numbers: low to high
Chapter 1
Chapter 10
Chapter 2
Chapter 3
Chapter 1
Chapter 2
Chapter 3
Chapter 10

Numeric sorting understands negative numbers and decimals such as -4.5, and ignores thousands separators like 1,20,000 or 120,000.

Handy uses

  • Alphabetise a class list, guest list or bibliography.
  • Sort keywords before comparing two keyword research files.
  • Rank a list of prices or scores that you copied from a spreadsheet column.
  • Draw a random order for presentations or a lucky draw with Shuffle.

For a bibliography, remember that citation styles have their own rules, for example ignoring "The" at the start of a title. Sort first here, then adjust those few entries by hand.

Sorting Hindi and other scripts

Alphabetical sorting uses your browser's language rules, so Hindi words sort in Devanagari order (अ, आ, इ ...) and accented Latin letters sort with their base letter. When a list mixes scripts, each script is grouped together. Everything runs on your device, and there is no limit on the number of lines.

Frequently asked questions

How do I sort lines alphabetically?
Paste your list, keep the order on A to Z, and copy the result. Tick Ignore case so capital and small letters sort together.
Why does 10 come before 2?
In plain alphabetical order, text is compared character by character, so "10" starts with "1". Choose Numbers: low to high to sort by the numeric value instead.
Is the shuffle really random?
It uses the Fisher-Yates shuffle with your browser's cryptographic random number generator, so every order is equally likely.
Can I sort and remove duplicates together?
Yes. Tick Remove duplicates and each line appears only once in the sorted result.