ZapKit

Text Cleaner

Clean up text copied from PDFs, websites and chat apps: extra spaces, stray blank lines, hidden characters and curly quotes, fixed in one go.

What is a text cleaner?

A text cleaner fixes the formatting junk that comes along when you copy and paste: double spaces, spaces at the ends of lines, tabs, runs of empty lines, hidden zero-width characters and typographic quotes that some forms and code editors reject.

Writers use it to tidy drafts before publishing, students to clean quotes copied from PDFs, and developers to sanitise strings before putting them in a database or spreadsheet. Every fix is optional and the text never leaves your browser, so you can clean confidential documents safely.

How to remove extra spaces and blank lines

  1. 1.Paste the messy text

    Anything copied from a PDF, a web page, WhatsApp or an old document.

  2. 2.Tick the fixes you want

    Each one is a separate switch, so you only change what's broken.

  3. 3.Copy the clean version

    Compare the character counts before and after, then copy or download.

Example: a paragraph pasted from a PDF

Text with leading spaces, double spaces, a hidden zero-width space, two blank lines and a tab, cleaned with the default settings:

Characters before
105
Characters after
90
Blank lines
2 in a row reduced to 1
Hidden characters
1 zero-width space removed

Fifteen characters of invisible clutter were removed and every word is unchanged.

What gets fixed

Text copied from a PDF usually arrives with a hard line break at the end of every printed line. Join lines into one paragraph puts each paragraph back together, while keeping the blank line between paragraphs.

Invisible characters are the hardest to spot: zero-width spaces, byte order marks and soft hyphens look like nothing but break searches, form validation and code. They're removed, and no-break spaces become ordinary spaces. Straightening quotes turns “ ” and ‘ ’ into plain " and ', and long dashes and ellipses into their plain equivalents, which some systems need.

Frequently asked questions

How do I fix text copied from a PDF?

Tick Join lines into one paragraph. Lines are joined with spaces, while blank lines between paragraphs are kept.

What are invisible characters?

Characters such as the zero-width space (U+200B) that take no room on screen. They often come from web pages and messaging apps.

Will it change my words?

No. Only whitespace, invisible characters and, if you choose, quote marks and dashes are changed.

Can I keep my blank lines?

Yes. Set Blank lines to Keep as they are, or allow at most one in a row.

More Utilities tools