inyourbrowser.com

Sort lines

Sort lines is a text tool that reorders a list of lines using one of several modes. It supports alphabetical (ascending or descending), by length, and random shuffle, plus options to deduplicate, trim whitespace, and remove empty lines. The tool runs in your browser.

Input

Sorted output

SORT OPTIONS

Dedicated pages

Mode-specific and use-case sort tools.

How to sort lines

  1. Paste your list into the input area, one item per line.
  2. Choose a sort mode: A to Z, Z to A, shortest first, longest first, or shuffle.
  3. Toggle options like Remove duplicates or Trim whitespace as needed.
  4. The sorted output appears instantly. Copy it from the output area.

Common uses

Technical specification

Frequently asked questions

What sort modes are available?
Five modes: A to Z (alphabetical ascending), Z to A (alphabetical descending), Shortest first (by character count), Longest first (by character count), and Shuffle (random order using Fisher-Yates).
How does duplicate removal work?
Duplicate removal keeps the first occurrence of each unique line and discards the rest. Comparison is case-insensitive and respects any whitespace trimming you have enabled.
Can I shuffle my list randomly?
Yes. The Shuffle mode uses the Fisher-Yates algorithm with Math.random() to produce a randomly ordered list. Each shuffle produces a different order.
Is my text sent to a server?
All text processing runs locally in your browser. No data is sent to our servers.

Reviewed and tested May 25, 2026.