UtilHero

Remove Duplicate Lines

De-duplicate, trim, clean, and sort lines — in your browser.

Sort
00 lines

About Remove Duplicate Lines

Remove duplicate lines from any text in one pass: this tool dedupes your lines, trims whitespace, drops blank lines, and can sort the result A→Z or Z→A. Paste your list, toggle the options you want — including case-insensitive matching — and get clean output instantly, with a before-and-after line count. Everything runs in your browser, nothing uploaded.

Frequently asked questions

Does it keep the first or last duplicate?
It keeps the first occurrence of each line and removes later duplicates, preserving order unless you also sort.
Can it remove duplicate lines and sort alphabetically?
Yes. Turn on sorting to arrange the deduplicated lines A→Z or Z→A, so you get a clean, ordered list in one step.
Can it ignore case when finding duplicates?
Yes. Turn on case-insensitive matching to treat 'Apple' and 'apple' as the same line.
In what order are the steps applied?
Trim, then remove blanks, then de-duplicate, then sort — a predictable order that gives consistent results.

More tools

All Text Tools