What each button does
- Trim each line — removes spaces and tabs from the start and end of every line.
- Remove blank lines — deletes empty lines (including lines that are only spaces).
- Remove duplicate lines — keeps the first occurrence of each line, drops the rest, and preserves the order.
- Collapse spaces — turns runs of multiple spaces into a single space.
- Sort A→Z / Z→A — sorts the lines alphabetically.
- Reverse lines — flips the order top to bottom.
- Remove line breaks — joins everything into one line, separated by single spaces.
Buttons stack, so you can trim, then remove blanks, then dedupe in sequence. Undo steps back one operation at a time.
Why do this in your browser
The text people clean is usually a list of names, emails, product codes or rows pulled from a spreadsheet — often internal, sometimes personal. This tool does everything with JavaScript in your own tab, so the list is never uploaded. Load the page, switch off your internet, and it still works. A tool that needs to "upload" a text list to sort it is doing on a server what your browser already does instantly.
A common workflow
Pasted a column of email addresses with trailing spaces and repeats? Trim each line, then Remove duplicate lines, then Sort A→Z — you now have a clean, de-duplicated, ordered list ready to paste back. To count what's left, our Word Counter gives you the totals.
Frequently asked questions
Does "remove duplicates" keep the order?
Yes. It keeps the first time each line appears and removes any later copies, so the surviving lines stay in their original order unless you sort afterwards.
Is the matching case-sensitive?
Yes — Apple and apple count as different lines. Use our Case Converter first if you want them treated the same.
Is there a size limit?
Only your device's memory. Nothing is uploaded, so there's no server limit on how much you can paste.
Tools that pair with this one
- Word Counter — count the lines, words and characters after cleaning.
- Case Converter — normalise the case of a cleaned list.
Everything runs locally in your browser. Keep a copy of anything important before cleaning — Undo steps back one operation, but a fresh paste is the safest backup.