Sort Lines Online

Sort lines alphabetically or numerically, ascending or descending, instantly in your browser. Free online line sorter with case-insensitive option.

Loading calculator…

Results

Sorted lines
DetailValue
Original lines
Resulting lines

What is this calculator for?

Re-order lines in your text alphabetically or numerically, in either direction.

How to Use This Calculator

Enter the values below, then press Calculate (or press Enter). The calculator updates your results instantly. Try different values to see how your inputs change the outcome.

  1. Lines to sort — enter a value. A typical Lines to sort would be One item per line….
  2. Order — enter a choice from the options.
  3. Ignore case — enter a yes/no option.
  4. Sort as numbers — enter a yes/no option.
  5. Remove duplicate lines — enter a yes/no option.
  6. Review your results — the key output is highlighted, with supporting figures below.

What You'll Need

Lines to sort
a value · required
Order
a choice from the options (Ascending (A→Z), Descending (Z→A)) · optional
Ignore case
a yes/no option · optional
Sort as numbers
a yes/no option · optional
Remove duplicate lines
a yes/no option · optional

About This Calculator

This line sorter places every line in ascending or descending order. It can compare case-insensitively (so "apple" and "Apple" sort together), treat each line as a number, and optionally remove duplicates.

Useful for keyword lists, inventory, names, or any text where each line is an item.

Sorting happens locally — nothing is uploaded.

Worked Examples

Example

apple Apple banana cherry

Frequently Asked Questions

How does case-insensitive sorting work?
Lines are compared using their lowercase form, so capitalization does not affect position. The original text is preserved.
Can I combine sorting with duplicate removal?
Yes. Enable "Remove duplicate lines" (exact duplicates) and the tool will both deduplicate and sort. Ignores case means "Apple" and "apple" sort adjacent but are still kept as separate cases.