Clean text and lines

Remove duplicate or empty lines, join lines and tidy spaces. Combine actions, ignore case or sort the result.

Text is not saved or sent. Limit: 200,000 UTF-16 code units.

Duplicate matching · sorting

Order: clean spaces → remove empty lines → remove duplicates → join lines → sort.

Suggest improvements

Cleanup can remove intentional spacing and repeated content. Review the result before replacing your original.

How to use Clean text and lines

Paste text and select the actions you want. More options controls case-insensitive duplicate matching and sorting.

Actions run in this order: clean spaces, remove empty lines, deduplicate, join lines, then sort. Your original stays in the input box. Copy the result or save a text file.

Example
Two identical lines can be reduced to one, with surrounding spaces trimmed during deduplication.

Remove duplicate lines and blank lines from copied lists

Select the cleaning operations you need together. Spaces are normalized first, followed by blank-line removal, deduplication and line joining. Optional sorting runs last.

Duplicate matching is case-sensitive by default. More options can ignore case. The result is displayed separately so you can check it without overwriting the original text.

Separate lines Apple and apple both remain by default. With case-insensitive deduplication, only the first occurrence remains.

Continue with: Character and byte counter

Frequently asked questions

Can I apply several actions?

Yes. Their order is shown above the result.

Is text uploaded?

No. It is processed in this browser only.

Reviewed: 2026-10-06 · Report an issue