Sort Lines

Sort lines alphabetically (A-Z or Z-A), numerically, by length, or using natural sort order. Remove duplicates, strip empty lines, and trim whitespace. Shuffle lines randomly. All processing happens in your browser.

How It Works

1

Paste or type your text

Enter or paste the lines of text you want to sort into the input area.

2

Choose a sort mode and options

Select a sort order (A-Z, Z-A, Numeric, By Length, Natural, or Shuffle) and toggle options like removing duplicates or empty lines.

3

Copy the result

The sorted text appears instantly. Copy it to your clipboard with one click.

Frequently Asked Questions

What sort modes are available?

The tool supports alphabetical (A-Z and Z-A), numeric, by line length, natural sort (handles numbers within text correctly, e.g. file2 before file10), and random shuffle.

What does natural sort mean?

Natural sort treats embedded numbers as whole values rather than character-by-character. So 'item2' comes before 'item10', matching how humans expect to see numbered items ordered.

Can I remove duplicate lines?

Yes. Toggle 'Remove Duplicates' and duplicates will be removed. When combined with 'Case Insensitive', lines that differ only in casing are treated as duplicates, keeping the first occurrence.

Is my text sent to a server?

No. All sorting and processing happens in your browser. Your text never leaves your device.

Related Tools