Text Cleaner
Paste text from a PDF, web page, email or AI chat, tick the steps you need and copy clean text. The text cleaner removes line breaks, extra spaces and hidden characters and shows exactly what it changed.
How it is calculated
Copied text often carries clutter: hard line breaks from PDFs, double spaces, tabs, empty lines and invisible characters you cannot see but that break form fields, searches, spreadsheet lookups or code. This tool removes them step by step and counts every change.
What each step does
- Invisible characters: removes the zero width space (U+200B), word joiner (U+2060), byte order mark (U+FEFF), soft hyphens (U+00AD) and bidirectional control characters. Non-breaking and narrow spaces (U+00A0, U+202F and others) become normal spaces. Joiners inside emoji such as 👨👩👧 are kept.
- Trim spaces at line starts and ends, and collapse extra spaces and tabs inside lines.
- Empty lines: “collapse to one” keeps paragraphs but removes repeated blank lines and blank lines at the start and end; “remove all” deletes every empty line.
- Remove all line breaks: joins all lines with a space into one paragraph.
- Duplicate lines and sorting: for lists, email addresses or keywords. Sorting follows the Unicode Collation Algorithm and natural number order.
- Special characters: keeps letters of every script (é, ñ, ü, Greek, Cyrillic …), digits, punctuation and whitespace – based on the Unicode general categories L, M, N and P. Emoji, symbols, arrows, currency and math signs are removed.
The steps always run in this order. Your text is never uploaded or stored.
Frequently asked questions
How do I remove line breaks from copied PDF text?
Paste the text and tick “Remove all line breaks”. Lines are joined with a space. To keep paragraphs, leave that option off and use “Empty lines: collapse to one” instead.
How do I remove extra spaces between words?
Keep “Remove extra spaces” ticked: every run of spaces or tabs becomes one space, and the change list tells you how many places were fixed. In Excel or Google Sheets, =TRIM() does the same inside a cell.
What are invisible characters and why remove them?
Characters with no visible width, such as the zero width space or byte order mark. They sneak in when copying from websites, messengers or AI chat tools and can make searches fail or inputs invalid.
Will accented letters be removed as special characters?
No. Letters of every language stay – é, ñ, ü as well as Greek or Cyrillic. Only symbols, emoji and similar characters are removed.
Sources and legal basis
- Unicode Standard Annex #44 – General_Category (L Buchstaben, M Zeichen, N Ziffern, P Satzzeichen)
- Unicode Code Charts – General Punctuation U+2000–U+206F (Zero Width Space, Word Joiner, Leerzeichen-Varianten)
- Unicode Standard Annex #29 – Text Segmentation (Grapheme)
- Unicode Technical Standard #10 – Unicode Collation Algorithm
- MDN Web Docs – Intl.Collator (numeric)
As of:
Related tools
- Case ConverterConvert text to UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case or kebab-case. Free, instant and private – runs in your browser.
- Character Counter and Word CounterCount characters with and without spaces, words, sentences, paragraphs and reading time – live, with limits for X, Instagram, TikTok, LinkedIn, SMS and more.
- Fancy Text GeneratorTurn text into bold, italic, cursive, gothic and 20+ other fancy fonts to copy and paste into Instagram, TikTok or Discord – with a note on accessibility.
- Text Compare: Find Differences Between Two TextsCompare two texts online and highlight the differences by line, word or character, with a similarity score. Free, private, runs in your browser.
- Hashtag Counter & Instagram Caption FormatterCount hashtags and @mentions, spot duplicate hashtags and clean up your caption: move hashtags to the end and keep line breaks. Free and private.
- Image to text converterConvert an image to text: copy text from photos, scans and screenshots. OCR for English, German, French, Spanish and Portuguese – in your browser, no upload.