Text Cleaner
Trim every line, drop the blanks, remove duplicates - all four results at once, in your browser, on lists that have been through three programs.
Paste a list that has been through a spreadsheet, an email and a document. All four cleanups appear together so you can take whichever one you actually needed.
Cleaned — trimmed, blanks gone, deduplicated
The one you probably want. Keeps the original order.
apple banana cherry date
Tidied only — trimmed, blanks gone
Duplicates kept, in case they mean something.
apple banana apple cherry banana date
Cleaned and sorted A-Z
Sorting destroys any order the list had — use only if it had none worth keeping.
apple banana cherry date
Cleaned and numbered
Adds '1. ', '2. ' and so on. Changes the text, so do not re-clean this.
1. apple 2. banana 3. cherry 4. date
About this tool
How to Clean Up a Messy ListTrim first — not because of blank lines, but because a deduplicate that runs too early removes almost nothing while looking like it worked.
Free download
List Cleanup ReferenceThe order operations must run in, and why. Getting the order wrong leaves work behind that looks finished.
Free, no email required — print it or save it as a PDF.
Share it
Text Cleaner infographicThe key numbers as one image — free to save, share, or embed on your own site with credit.
How this works
Each output is a fixed pipeline of operations applied in order, and the order is the part that matters. Trimming each line comes FIRST, and the reason is deduplication rather than blank lines. Deduplication compares lines as raw strings, so 'apple' and 'apple ' are different and BOTH survive - on a list that has been through a spreadsheet, that means a dedupe run too early removes almost nothing while appearing to work. Trim first and the same list collapses properly. Removing blank lines is more forgiving than you might expect: it tests each line after trimming it, so a line containing only spaces is dropped whether or not you trimmed first. That is worth knowing because it is the opposite of the usual advice - here it is the DEDUPE that needs the trim, not the blank-line removal. Deduplication keeps the FIRST occurrence of each line and removes later ones, so the original order is preserved rather than shuffled. It is case-sensitive: 'Apple' and 'apple' are treated as different lines, because collapsing them would be a judgement about your data rather than a cleanup of it. Run the case converter first if you want them merged. Sorting is alphabetical using your browser's locale comparison, which handles accented characters more sensibly than a raw character-code sort would. It is a separate output rather than folded into the main clean, because sorting destroys any meaningful order the list already had. Numbering adds '1. ', '2. ' and so on after cleaning. It changes the text, so a numbered output cannot usefully be fed back through a dedupe - every line is now unique. What this deliberately does NOT do is collapse multiple spaces inside a line, strip punctuation, or fix capitalisation. Each is a decision about content rather than formatting, and a cleaner that quietly rewrites the middle of your lines is harder to trust than one that does less. Nothing is transmitted. The whole thing runs in your browser, which matters given that the lists people paste into cleanup tools are usually email addresses, customer names or exported data.
Common questions
- Why does trimming have to happen first?
- Because deduplication compares lines as raw strings. 'apple' and 'apple ' are different, so both survive - and on a list that has been through a spreadsheet, a dedupe run before trimming removes almost nothing while looking like it worked. Blank-line removal, by contrast, does NOT need it: it tests each line after trimming it internally, so whitespace-only lines are dropped either way. The order requirement is real, but it belongs to the dedupe.
- Is the deduplication case-sensitive?
- Yes. 'Apple' and 'apple' are treated as different lines and both survive. That is deliberate - collapsing them would be a judgement about your data rather than a cleanup of it, and for names, codes and identifiers it would frequently be the wrong one. If you want them merged, run the text through the case converter first and then clean it.
- Does deduplicating change the order?
- No. It keeps the FIRST occurrence of each line and drops the later ones, so the original order survives. That is why sorting is a separate output rather than being folded into the main clean - sorting destroys whatever order your list had, and quite often that order was the point.
- Why doesn't it collapse double spaces inside a line?
- Because that is a decision about content, not formatting. Two spaces after a full stop is a house style; a run of spaces inside a line might be alignment that matters, or a separator in exported data. A cleaner that quietly rewrites the middle of your lines is harder to trust than one that does less and does it predictably - this one only touches the ends of lines and the lines themselves.
- Can I clean the numbered output again?
- Not usefully. Numbering prepends '1. ', '2. ' and so on, which changes the text - so every line is now unique and a second deduplication would find nothing to remove. Number last, and only when you are finished with everything else.
- Is my list sent anywhere?
- No. Everything runs in your own browser through a fixed list of allowed text operations - no upload, no server, nothing stored. This is worth stating plainly because of what actually gets pasted into cleanup tools: email lists, customer names, exported spreadsheets and the occasional thing that should not have left the building at all.
Last updated
Get the next tool.
New tools and guides straight to your inbox. No spam, ever.
Part of a bigger job
How to Clean Up a Messy ListSix text tools, one order — trim before you de-duplicate, because "apple" and "apple " are two different things to every computer that has ever existed.
Walks through all 6 text tools in order.