Text Cleaner
Tidy messy text: extra spaces, blank lines, PDF line breaks, HTML tags, curly quotes, emoji and hidden characters.
How it works
Tick the clean-ups you need and the cleaned text appears at once, with a count of how many characters were removed. The most useful one for students is "Join lines inside paragraphs": text copied from a PDF has a line break at the end of every line, and this joins them back into proper paragraphs (a blank line still separates paragraphs). It also rejoins words that the PDF split with a hyphen at the end of a line.
Other options trim every line, collapse repeated spaces, remove blank lines, strip HTML tags, straighten curly quotes and dashes, remove emoji and delete hidden characters (zero width spaces, soft hyphens and non-breaking spaces) that sneak in from websites and break search and code.
Worked example
PDF text "The quick brown fox jumps over the lazy dog. Next sen- tence starts here." with Join lines turned on becomes "The quick brown fox jumps over the lazy dog. Next sentence starts here."
Good to know
- Pasting into code or a form and getting a strange error? Turn on "Remove hidden characters". Zero width spaces are invisible.
- Straighten quotes before pasting text into code, where curly quotes are a syntax error.
- Turn off "Join lines" for poems, lists and code where line breaks matter.
Common questions
- What are hidden characters?
- Characters with no visible shape, such as zero width space, soft hyphen and the byte order mark. Websites and chat apps add them.
- Why does text from a PDF have broken lines?
- PDFs store each line separately. Copying keeps the line ends. Joining lines fixes that.
- Does it change my words?
- No, only spacing, quotes, tags and hidden characters.
- Does it keep Hindi text?
- Yes. Only the options you pick change the text.
More in Text.
Write a money amount in words for cheques and invoices, like "Rupees One Lakh Only".
OPEN →Bold Text GeneratorMake bold text you can paste into Instagram, WhatsApp, X and LinkedIn, and get the WhatsApp markup that works without special letters.
OPEN →Bubble Text GeneratorPut every letter and number inside a circle, a square or brackets, in white or black bubbles.
OPEN →