Cleaning text pasted from a PDF
PDF copy often inserts hard line breaks mid-sentence and double spaces between words. This cleaner merges runs of spaces and tabs into one space, strips spaces hugging newline characters, and trims the whole string so paragraphs flow again.
Double spaces after a period
Two spaces after punctuation become one, like any other space run. It does not rewrite typography rules or insert non-breaking spaces — it only normalizes whitespace characters already in the paste.
More than two consecutive blank lines collapse to a single empty line between paragraphs, keeping section breaks without huge vertical gaps.
Questions
Will it remove indentation at line starts?
Spaces before a newline are trimmed as part of *\n * normalization, so leading indents on wrapped lines may flatten. Use only when you want flat paragraphs.