Text utility

Line Sorter

Sort one item per line with alphabetic, natural, numeric, length, or random ordering, plus duplicate removal, whitespace cleanup, and empty-line controls.

Input list

Paste lines to sort

Local only

Ready.

Sorted output

Sort stats

List summary

Total lines0
Blank lines0
Unique lines0
Duplicates removed0
Output lines0
Sort modeNatural

Before and after preview

#OriginalSorted

Popular line sorting tasks

Sort mode reference

ModeBehaviorBest for
Natural textCompares text while treating embedded numbers numericallyFiles, IDs, item2 vs item10 lists
Alphabetic textLocale-aware text comparisonKeywords, names, tags
NumericSorts by the first number found on each lineScores, prices, numbered exports
LengthSorts by character lengthFinding short or long entries
RandomShuffles linesRandomizing lists, samples, prompts

Line sorter notes

Local processingSorting happens in your browser. The list is not uploaded.
Natural orderNatural sort places file2 before file10, which often feels more human than plain alphabetic sorting.
Numeric modeNumeric sort uses the first number found on each line. Lines without numbers are placed after numeric lines.
Unique modeEnable unique lines to remove duplicates before sorting while keeping one copy.

FAQ

Can I sort numbers correctly?

Yes. Choose numeric sort to compare values as numbers instead of text.

Why is natural sort different from alphabetic sort?

Natural sort understands embedded numbers, so item2 comes before item10.

Can I remove duplicates while sorting?

Yes. Enable unique lines only to remove duplicate rows before sorting the output.