To sort lines, paste a list with one item per line, choose an order such as A → Z, Numeric or By length, and copy the result. A good line sorter also handles the awkward cases, like putting "Flat 2" before "Flat 10" or ignoring the commas in "₹1,25,000".

Below is how each sort mode works, which one to pick for common Indian lists, and the mistakes that lead to strange-looking results.

How to sort a list online

  1. Open Sort Lines.
  2. Paste your list into the left box, one item per line.
  3. Pick a mode: A → Z, Z → A, Natural, Numeric, By length, Reverse order or Shuffle.
  4. Adjust the options if needed: Remove duplicates, Trim spaces, Remove empty lines and Ignore case.
  5. The sorted list appears on the right as you go. Click Copy or Download, or Use as input to sort it again a different way.

If you chose Shuffle, a Shuffle again button appears so you can draw a fresh order.

Which sort order should you choose?

Each mode solves a different problem. This table shows what each does with the same few lines.

Mode Best for Example result
A → Z Names, cities, words Agra, Bhopal, Chennai
Z → A Reverse alphabetical lists Chennai, Bhopal, Agra
Natural Text with numbers inside Flat 2, Flat 10, Flat 101
Numeric Prices, scores, quantities 7.5, 42, 100, 1,250
By length Finding short or long entries Tea, Coffee, Masala chai
Reverse order Flipping a list upside down Last line becomes first
Shuffle Random order, draws, quiz questions Different every time

Alphabetical (A → Z and Z → A)

These modes use your browser's language-aware comparison rather than raw computer codes. That means "apple" and "Apple" sit together instead of all capitals coming first, and accented names like "José" sort next to "Jose". With Ignore case off, lines that differ only in capitals are kept in a consistent order.

Natural

Natural sort is the one most people actually want for anything with numbers in it. Plain A → Z puts "Roll 10" before "Roll 2", because it compares the character "1" with "2". Natural mode understands that 10 is bigger than 2. Use it for file names, invoice numbers like "INV-9" and "INV-12", flat numbers and chapter lists.

Numeric

Numeric mode finds the first number in each line and sorts by its value. It ignores commas, so Indian-style figures like "1,25,000" are read correctly, and handles decimals and negative numbers. Lines without any number are moved to the bottom, which makes them easy to spot and fix.

By length

Sorting by length, shortest first, is surprisingly useful. It quickly shows blank-looking entries, codes that are missing a digit (a 9-digit mobile number in a list of 10-digit ones) and over-long product names that will not fit on a label.

Shuffle

Shuffle puts lines in random order using the browser's cryptographically secure random generator and the Fisher–Yates method, so every arrangement is equally likely. Teachers use it to mix quiz questions or seating plans, and offices use it for duty rosters or Secret Santa lists. For picking one or a few winners from a list, the Random Picker is designed for that job.

Common mistakes and how to fix them

  • Numbers sorted as text. If "100" appears before "20", you are in A → Z mode. Switch to Natural or Numeric.
  • Phone numbers in mixed formats. "+91 98300 12345" and "9830012345" will not sort together. Standardise them first with Find and Replace.
  • Hidden spaces at the start of lines. A leading space can push an item to the top. Keep Trim spaces ticked.
  • Dates in DD/MM/YYYY format. Alphabetical sorting puts 01/12/2025 before 02/01/2025. For correct date order, write dates as YYYY-MM-DD before sorting, or sort them in a spreadsheet.
  • Sorting multi-column data. If each line has a name and an amount separated by a tab, the whole line is sorted by its start. For proper column sorting, open the data in a spreadsheet or the Excel & CSV Converter, which lets you sort by any column.

Practical examples

Alphabetical class list. Paste student names, choose A → Z, tick Remove duplicates, and you have a clean register in seconds.

Price list from a supplier. Paste lines like "Rice 25 kg – ₹1,450", choose Numeric, and the tool sorts by the first number it finds. Here that is 25, not the price, so put the price first in each line, or edit the text so the number you care about comes before any other.

Keyword lists. SEO teams often merge keyword exports, remove duplicates and sort A → Z to group similar phrases together.

Random presentation order. Paste team names, choose Shuffle, and share the result on the group chat.

If you only need repeats removed and want to keep the existing order, use Remove Duplicate Lines instead.

Quick checklist for a clean sorted list

Before you copy the result into a register, a report or a website, run through these points:

  • Every line holds one item only, with no stray tabs or commas joining two entries.
  • Numbers you care about are in the same position and format on every line.
  • Trim spaces and Remove empty lines are ticked unless you need blank lines.
  • Ignore case matches what you want: on for names, off for case-sensitive codes.
  • The first and last few lines look right. If not, try Natural instead of A → Z.
  • You have kept the original list somewhere in case you need to undo the sort.

Sorting is quick to redo, so experiment with a couple of modes and compare. The tool updates instantly when you switch, which makes it easy to see which order suits your data best.

Does the sorter upload my list?

No. Sort Lines runs completely inside your browser. The list you paste is not sent to BISCS India's servers or stored after you close the page, which makes it suitable for internal staff lists, customer data or exam marks.