Sort Lines

Sort Lines reorders the lines of your text alphabetically (A→Z or Z→A), numerically, by length, or shuffles them randomly. Case-insensitive sorting is on by default so capitalization doesn't scatter related items.

It runs locally in your browser, so lists of names, URLs, keywords or data stay on your device.

0
Input lines
0
Output lines
0
Removed

How to use Sort Lines

  1. 1

    Paste your lines

    Enter any text with one item per line.

  2. 2

    Pick a sort order

    Choose A→Z, Z→A, numeric, by length, or shuffle. Toggle case sensitivity if needed.

  3. 3

    Clean up while sorting

    Optionally trim lines, drop empty lines, remove duplicates, or reverse the final order — all in one pass.

  4. 4

    Copy the sorted result

    The reordered lines appear instantly — copy or download them with one click.

Alphabetical vs. numeric sorting

Plain alphabetical sorting compares text character by character, which means "item10" comes before "item2" because "1" sorts before "2". Numeric sorting understands the numbers inside the text, so "item2" correctly comes before "item10".

Use numeric sorting for version numbers, file names with indexes, or any list where embedded numbers should order naturally.

Sort by length and shuffle

Sorting by length orders lines from shortest to longest — handy for finding outliers or arranging dropdown options. Shuffle randomizes the order, which is useful for picking a random sample, randomizing quiz questions or breaking up a predictable sequence.

You can also remove duplicates, trim whitespace and drop empty lines in the same pass, so the sorted list comes out clean without a second tool.

Frequently asked questions

Is sorting case-sensitive?
By default it ignores case so "Banana" and "banana" sort together. Uncheck "ignore case" for strict, case-sensitive ordering.
Can it sort numbers correctly?
Yes. The numeric mode sorts by the numbers embedded in each line, so 2 comes before 10.
Does the shuffle use real randomness?
It uses a Fisher–Yates shuffle for an unbiased random order. It's intended for convenience, not cryptographic use.

Last updated: