Text Cleaner

Trim whitespace, sort lines, remove duplicates, strip HTML, or reverse text.

Messy Text

Line & Structure Tools

Output Result

Cleaning up a pasted list

Most of these operations work line by line, which is what makes them useful on lists pasted out of a spreadsheet, a log, or an email. Trim removes leading and trailing whitespace from every line and drops blank lines entirely — usually the first thing worth doing, since stray spaces make later steps behave unexpectedly.

Remove Duplicates keeps the first occurrence of each line and preserves the original order, rather than sorting as a side effect. Comparison is exact and case-sensitive, so Apple and apple both survive. Trim first if trailing spaces might be hiding duplicates from each other.

Strip HTML removes anything between angle brackets, which is the right tool for pulling readable text out of a copied fragment of markup. It is deliberately simple — it is not a sanitiser, and should not be used to make untrusted markup safe to render.

Frequently asked questions

Does removing duplicates change the order?

No. The first occurrence of each line stays where it was and later repeats are dropped. Use Sort A-Z separately if you want alphabetical order.

Is duplicate matching case-sensitive?

Yes, and it is an exact match. Apple and apple are treated as different lines, as are lines that differ only by trailing whitespace — run Trim Spaces first to catch those.

How does Sort A-Z handle numbers?

It sorts lexicographically, so 10 comes before 2 because the comparison is character by character. That is standard string sorting, not numeric sorting.

Can Strip HTML sanitise untrusted input?

No. It removes anything between angle brackets, which is fine for extracting readable text, but it is not a security boundary. Use a real sanitiser for untrusted markup you intend to render.

What does Reverse Text reverse?

The entire string character by character, including line breaks — so the last character becomes the first. It does not reverse word or line order.