Text Line Sort & Dedupe
About Text Line Sort / Dedupe
Text Line Sort / Dedupe cleans lists, logs, identifiers and other line-oriented text with independent controls for ordering, duplicate matching, whitespace and empty lines.
How it works
Stable duplicate removal
The first occurrence is retained and later matches are removed. Matching can preserve case distinctions or treat case variants as the same line, and original order can be left untouched.
Natural line sorting
Ascending and descending modes use locale-aware numeric comparison, so item2 sorts before item10. Equal comparisons retain their original relative order.
Predictable whitespace cleanup
Optional trimming happens before duplicate checks and sorting. Empty-line removal follows trimming, and a final newline is retained when the input had one and output remains.
Frequently asked questions
Can I remove duplicates without sorting?
Yes. Choose Original order and enable Remove duplicates for stable first-occurrence deduplication.
Does case-insensitive mode change the text?
No. It only changes comparison keys. The spelling of the retained first line remains unchanged.
Are Windows line endings supported?
Yes. CRLF and legacy CR input are recognized and output is normalized to LF.
Sources & last verified
The behaviour of this tool and the claims on this page were checked against the specifications below on . Everything runs in your browser, so the output you see is exactly what the engine produced.
Found a wrong result or an outdated claim? Report an error and it will be re-verified.