Trieur de lignes gratuit en ligne

Sort, reverse, deduplicate, or shuffle lines of text.

No data leaves your device
0 lines

Sort Mode

0 lines

About Line Sorting

Line sorting arranges text by comparing each line according to a chosen order. Alphabetical sorting is useful for lists, glossaries, and directories. Numeric sorting treats each line as a number and orders by value. Length-based sorting groups short and long entries together, which helps with formatting and layout tasks.

This tool also lets you remove duplicate lines, strip empty lines, trim whitespace, reverse the order, or randomly shuffle lines. All processing is instant and runs in your browser.

Common Uses

Frequently Asked Questions

How does numeric sorting work?

Numeric sorting extracts the leading number from each line and orders by that value. Lines that don't start with a number are sorted to the end. This means "9 items" comes before "10 items" (unlike alphabetical sort, where "10" would come before "9").

What does "Remove duplicates" do?

It removes lines that appear more than once, keeping only the first occurrence. When combined with "Case insensitive", lines that differ only in capitalization are also treated as duplicates.

Is the shuffle truly random?

The shuffle uses the Fisher-Yates algorithm with Math.random(). It is suitable for casual use like randomizing lists or drawing names. It is not cryptographically secure · for security-sensitive randomness use a dedicated tool.

Related Tools