Text Tools

Text Cleaner / Line Sorter

Sort lines, remove duplicate and blank lines, and tidy whitespace in any list or block of text.

Clean up a list or block of text: sort lines, remove duplicates and blank lines, and tidy whitespace, entirely in your browser. Want to see exactly what changed between two versions? Use Text Diff.

Your text never leaves your device. Cleaning and sorting happen entirely in your browser.
0 characters

Options

Steps run in this order: trim, collapse spaces, remove empty lines, remove duplicates, then sort.

0 lines

How it works

Private text cleaning and line sorting in your browser

1

Paste your lines

Paste a list, a log excerpt or any text with one item per line.

2

Choose options

Turn on the clean-up steps and sorting you want. The result updates as you go.

3

Copy the result

Copy the cleaned text. The summary shows how many lines were removed.

Use cases

When this comes in handy

Deduplicate a list

Remove repeated emails, URLs or keywords while keeping the first occurrence of each.

Alphabetise names or items

Sort a list A–Z or Z–A, with numbers inside lines ordered by value if you want.

Tidy pasted text

Strip stray spaces, collapse repeated spaces and delete empty lines left by copy and paste.

FAQ

Common questions

Is my text uploaded anywhere?

No. All processing happens in your browser.

In what order are the options applied?

Always the same order: trim lines, collapse spaces, remove empty lines, remove duplicates (keeping the first occurrence), then sort or reverse.

How does sorting treat uppercase, lowercase and accents?

Sorting uses your browser's language-aware comparison, so accented letters sort next to their base letters. You can ignore case, and you can turn on natural sorting so item2 comes before item10.

Are line endings preserved?

Yes. If your text uses Windows (CRLF) line endings the result does too, and a trailing line break is kept only if the input had one.

Related Tools