Trieur de lignes gratuit en ligne
Sort, reverse, deduplicate, or shuffle lines of text.
Sort Mode
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
- Alphabetize a list of names, items, or entries
- Sort CSV column values or log entries
- Remove duplicate lines from a file or dataset
- Randomize a list for lotteries or game assignments
- Sort numbers from smallest to largest or vice versa
- Clean up data by trimming whitespace and blank lines
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.