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.
Source: Unicode Standard Annex #44 – General_Category (L Buchstaben, M Zeichen, N Ziffern, P Satzzeichen). Updated: .
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.
How to clean up text
- Paste text from a PDF, web page, email or AI chat.
- Tick the steps you need, such as remove extra spaces, empty lines or all line breaks.
- Check what changed and copy the clean text.
Example: copied from a PDF, “The contract␣␣starts↵on 1 May” becomes “The contract starts on 1 May” with “Remove extra spaces” and “Remove all line breaks”.
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.
More text tools: change capitalization with the case converter, count words with the word counter and compare two drafts with the text compare tool.
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.
How do I remove line breaks in Word?
Use Find and Replace (Ctrl+H): find ^p (paragraph mark) or ^l (manual line break) and replace with a space. Faster: paste the text here and tick “Remove all line breaks”.
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: · Editorial policy
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.
- Word Counter and Character CounterCharacter counter: characters with and without spaces, words, sentences, reading and speaking time, top words – live, with limits for X, Instagram and SMS.
- 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 TextsText compare online: see differences side by side or inline, by line, word or character. Jump between changes, save a patch. Private, in your browser.
- Password GeneratorGenerate secure random passwords and memorable passphrases with entropy shown in bits — calculated right in your browser, nothing sent or stored.
- Flesch Reading Ease CalculatorPaste your text to get the Flesch Reading Ease score, the score band, words per sentence and syllables per word – plus the German version by Amstad.
- Keyword combinerCombine up to 4 word lists into every keyword combination – with list order, separators and match types "phrase match" and [exact match]. No duplicates.
- Email signature generatorCreate an email signature: enter your name and contact details, pick a style, preview it and copy it as formatted text or HTML. Free, no sign-up needed.
- TXT to PDF ConverterConvert TXT to PDF or paste text: choose page size, font, size, margins, line numbers and page numbers, with a preview. Free, in your browser, no upload.