How to use the pdf text reflow cleaner
- Paste the text copied from the PDF.
- Choose where a new paragraph starts: at blank lines only, or also where a line ends a sentence and the next begins with a capital letter or a bullet.
- Choose whether to join words split by a hyphen, remove lines with only a page number and squeeze repeated spaces.
- Copy the cleaned text. The notes say how many line breaks, hyphen joins and page numbers were handled.
Two paragraphs from a PDF
The starting text has lines that break in the middle of sentences, a word split as "partici-" and "pants", and a stray page number line, 12. With blank lines as the paragraph rule, the page number removed and hyphens joined, the result is two paragraphs. The first reads "The study followed 240 participants over two years. Each person completed a short survey every month."
The second paragraph begins "Results were consistent across age groups." and ends with the sentence about participants who dropped out, with the lines joined by single spaces. Six line breaks were removed, one word was rejoined and one page number was dropped.
Why PDF text breaks badly
A PDF stores where each line sits on the page, not paragraphs. When you copy from it, every visual line becomes a line in the text, so paragraphs are broken into short lines, and words that the page broke across lines keep their hyphens. Page numbers, headers and footers also come along. Joining the lines puts the paragraphs back together.
Blank lines are the safest paragraph rule when the PDF has spacing between paragraphs. The sentence rule is for PDFs where paragraphs have no blank line between them. It starts a new paragraph when a line ends with a period, question mark, exclamation mark, colon or semicolon and the next begins with a capital letter, a digit or a bullet.
Hyphens need a human check
A hyphen at the end of a line followed by a lower case word is joined, as in partici-pants. The page cannot tell that from a real compound such as well-known, so those are joined too, and the notes tell you how many were. Skim the result for compounds. Words that continue with a capital letter keep their hyphen. For wrapping the other way, see the Hard Wrap Text Tool. To get the text from a PDF in the first place, use PDF to Text, and to fix odd characters the Text Encoding Fixer. Line level edits are in the Text Line Tools.
Assumptions and limits
- Soft hyphens (invisible hyphenation marks) are removed before the lines are joined.
- A page number line is a line with only a number, optionally with the word page, dashes around it or an "of" total. It is removed only if you turn that option on.
- Up to 2,000,000 characters are accepted. Everything runs in your browser and nothing is uploaded.
- Tables, columns and headings in the PDF are not recognized and may need manual fixing.
Frequently asked questions
Why does the page not remove all line breaks?
Blank lines are kept as paragraph breaks so that the structure of the text survives. Only the breaks inside a paragraph are joined.
Will it join a real hyphen like well-known?
Yes, if the hyphen ends a line and the next line starts with a lower case letter, because it cannot be told apart from a word split by the page. The notes count the joins so you can check.
What if my PDF has two columns?
Text copied from columns may come out mixed. Reflow only fixes line breaks, so copy one column at a time or use a PDF to text tool that reads columns in order.
Does it change the words?
No. It only changes line breaks, hyphens at line ends, repeated spaces and, if you ask, page number lines. Everything else stays as pasted.