About the Text Cleaner
This Text Cleaner tidies text that has been pasted from a web page, a PDF, an email or a chat. Choose the clean-ups you want and the result updates as you go. For spaces, it can collapse repeated spaces, trim every line, turn non-breaking spaces into normal ones, turn tabs into spaces or remove all whitespace. For lines, it can remove empty lines or keep at most one in a row. For characters, it can straighten curly quotes, dashes and ellipses, remove invisible zero-width characters, remove accents, punctuation, digits or non-ASCII characters. Two preset buttons, Fix pasted text and Plain ASCII, set the common combinations. You see the number of characters before and after. Remove accents does not transliterate letters like ß, and removing non-ASCII characters deletes letters of other alphabets. Nothing is uploaded.
Updated September 2026
How to use the Text Cleaner
- 1Paste your text into the Your text box.
- 2Press Fix pasted text for common clean-ups, or tick the options you want.
- 3Check the Cleaned text box and the character counts.
- 4Copy the result or download it.
Cleaning up pasted text
Text copied from the web, a PDF or an email often carries mess you cannot see: double spaces, trailing spaces, odd space characters and blank lines. The mess can break formatting, searches and imports. Paste it in, press Fix pasted text and compare the before and after counts. Then adjust the options if you need something different.
The steps run in a fixed order, so the result is the same each time: line endings first, then quotes, invisible characters, non-breaking spaces, accents, punctuation, digits, other characters, tabs, repeated spaces, trimming, empty lines and finally the removal of all whitespace.
Spaces, tabs and blank lines
Collapse repeated spaces turns runs of spaces or tabs into one space. Trim removes the spaces at the ends of each line. Tabs can be turned into a number of spaces first, so that they collapse along with the rest. For blank lines you can leave them alone, remove them all or keep one at a time, which is a good setting for paragraphs.
Punctuation, digits and accents
Remove punctuation deletes only characters that Unicode marks as punctuation, such as commas, full stops, brackets and quotes. Symbols like $, + and = stay, and so do letters and digits. Remove digits deletes 0 to 9. Remove accents strips the marks from Latin letters. Remove non-ASCII characters is the strongest option: it deletes letters of other alphabets, such as Arabic, Hindi and Chinese, and emoji, so use it only for plain English text. To remove repeated lines use Remove Duplicate Lines, and use the Case Converter to fix capitals.
Invisible characters
- Zero-width space, joiner and non-joiner, word joiner and byte order mark are removed.
- Non-breaking spaces, figure spaces and narrow no-break spaces become normal spaces.
- Curly quotes, en and em dashes and the ellipsis character can be straightened to plain keyboard characters.
- Removing joiners can change how some scripts and emoji sequences display, so review the result for those.
Features
- Collapse repeated spaces and trim every line
- Fix non-breaking spaces and tabs
- Remove all empty lines or keep at most one
- Straighten curly quotes, dashes and ellipses
- Remove zero-width characters
- Remove accents, punctuation, digits or non-ASCII characters
- Presets: Fix pasted text and Plain ASCII
- Character count before and after
Frequently asked questions
How do I remove extra spaces from text?
Paste your text and leave Collapse repeated spaces ticked. Two or more spaces in a row become one space. Trim every line also removes the spaces at the start and end of each line. The Cleaned text box shows the result straight away.
How do I remove all spaces?
Tick Remove all whitespace. This deletes every space, tab and line break, leaving one unbroken string. Use it for things like phone numbers or codes, not for ordinary sentences, since the words will run together.
How do I remove empty lines?
Under Lines, choose Remove all to delete every blank line, including lines that contain only spaces. Choose Keep one if you want to keep single blank lines between paragraphs but remove longer runs of them.
How do I clean text copied from a PDF or web page?
Press Fix pasted text. It collapses repeated spaces, trims lines, turns non-breaking spaces into normal ones, removes zero-width characters and keeps at most one empty line. Text from PDFs may also have hard line breaks in the middle of sentences, which the Remove Line Breaks tool can join.
How do I remove accents from letters?
Tick Remove accents. Letters with accent marks such as é, ü and ñ become e, u and n. It handles letters that carry a combining mark and does not change letters like ß or ø, which are separate letters. Tick Plain ASCII to combine this with removing other special characters.
What are zero-width characters?
They are invisible characters that take no space on screen, such as the zero-width space and the byte order mark. They sneak in from web pages and messages and can break searches, comparisons and code. Remove zero-width characters is ticked by default and deletes them.