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.
How to use Sort Lines
- 1
Paste your lines
Enter any text with one item per line.
- 2
Pick a sort order
Choose A→Z, Z→A, numeric, by length, or shuffle. Toggle case sensitivity if needed.
- 3
Copy the sorted result
The reordered lines appear instantly — copy 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.
To remove repeats before or after sorting, pair this with the Remove Duplicate Lines 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: