Text Cleaner
TX-56Paste text and remove the clutter: HTML tags, web addresses, email addresses, hidden characters, odd spaces, extra blank lines and any exact phrases you list.
Runs in your browser. Nothing is uploaded.
Text. Optional first lines: -- remove: some text
Cleaned text
How to use it
- Paste your text. To delete specific words or phrases, add first lines such as -- remove: Visit, one per phrase.
- Tick what to remove: tags, web addresses, email addresses, hidden characters, curly quotes, odd spaces.
- Set how to treat empty lines and whether each line is trimmed.
- Press Clean text. Press Show what is in the text first if you want a count of each kind of clutter without changing anything.
What each option removes
Remove HTML tags drops script and style content and comments, and turns block tags such as p and div into line breaks. Entities such as & are left as written. Web addresses start with http, https, ftp or www, and email addresses are found by a pattern, so both can miss unusual forms and neither is validated. Straighten curly quotes turns smart quotes into plain quotes and the ellipsis character into three dots. The unusual-spaces option turns non-breaking and other Unicode spaces into normal spaces and collapses runs of spaces.
Hidden characters
Pasted text often carries characters you cannot see: zero-width spaces, the byte order mark, soft hyphens, left-to-right and right-to-left marks and control codes. They break searches, comparisons and imports. Hidden-character removal deletes them but keeps tabs and line breaks. It leaves the zero-width joiner and non-joiner alone, because they are needed by emoji sequences and some scripts, so an emoji made of several parts stays whole.
Your own phrases
Each first line that starts with -- remove: names an exact piece of text to delete everywhere it appears. Matching is case-sensitive unless you untick the option, and the text is matched literally, not as a pattern. Phrases are removed first, before the other options run, so a phrase that includes a tag or a link is matched as typed. The directive lines themselves are not part of the output.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Paste the text to clean. | The input box is empty, or holds only -- remove: lines. | Add the text to clean below any -- remove: lines. |
Questions people ask
How do I clean up text I copied from a web page?
Paste it, keep Remove hidden characters and the unusual-spaces option ticked, add Remove HTML tags if tags came along, and press Clean text. Use Show what is in the text to see what was hiding in it.
How do I remove URLs and email addresses from text?
Tick Remove web addresses and Remove email addresses and press Clean text. Addresses starting with http, https, ftp or www and anything shaped like [email protected] are removed.
What are hidden characters and why remove them?
They are invisible characters such as zero-width spaces, soft hyphens and direction marks. They can break string comparisons, search and imports even though the text looks normal. Removing them makes the text plain.
How do I delete a specific word or phrase from text?
Start the first line with -- remove: and the exact text, for example -- remove: Visit, then paste your text below. Add one line per phrase. Untick Match case to ignore capitals.
Does it change the wording of my text?
No, only what you tick. It removes tags, addresses, invisible characters and listed phrases and adjusts spacing. Words, punctuation and capitals stay, except curly quotes if you choose to straighten them.
About this tool
Each option removes one kind of clutter and nothing else. Lines starting with -- remove: delete that exact text everywhere it appears (use several lines for several phrases). Hidden characters are zero-width space, word joiner, byte order mark, soft hyphen, left-to-right and right-to-left marks and similar direction controls, and control codes other than tab and line breaks; zero-width joiners and non-joiners stay, so emoji sequences and some scripts keep working. Tag removal drops script and style content and comments and turns block tags into line breaks, and entities are left as written. Web address and email matching are patterns, not validators. The report counts each kind without changing anything. Nothing is uploaded.