Pasted PDF Text Cleaner
Rebuilds paragraphs from text copied out of a PDF: rejoins broken lines, undoes end-of-line hyphenation and strips page numbers and repeated headers.
Everything runs inside your browser: the text is never uploaded anywhere.
Why pasted PDF text breaks
A PDF has no paragraphs: it stores glyphs positioned on a page. When you select and copy, the viewer turns each visual line into a real line break, so a paragraph arrives chopped every 70 or 80 characters, with the hyphen the typesetter used to split a word still stuck in the middle of it.
The tricky part is telling a line that continues the paragraph from one that ends it. The rule used here looks at the punctuation at the end of the line and at its length compared with the median line of the document: a line much shorter than the others is almost always the last one of a paragraph, a title or a list item.
Why text copied from a PDF arrives broken
A PDF stores glyphs positioned on a page, not paragraphs. When you select a passage and copy it, the viewer turns every visual line into a real line break, so the paragraph lands chopped every seventy characters. The hyphen the typesetter used to split a word at the end of a line comes along too, which is how a sentence about a compositor shows up as compo-sitor in the middle of your document.
The hard part is not joining lines, it is deciding which ones to join. Two signals do the work here: the punctuation ending the line, and its length compared with the median line of the document. A line ending in a period, a colon or a closing parenthesis closes the paragraph; a line much shorter than its neighbours is almost always the last of a block, a heading or a list item, so it stays put.
One surprise hides in the characters themselves: fi and fl often arrive as a single glyph, the typographic ligature the font uses to tuck the letters together. The text looks fine on screen, yet searching for fiscal in Word finds nothing and the spell checker flags the whole word. Journal headers repeated on every page and stray page numbers stuck inside a sentence get cleaned in the same pass.
Frequently asked questions
Why is there a hyphen inside my words?
How are repeated headers detected?
Is the pasted text sent to a server?
Related Tools
Remove Extra Spaces
Remove double spaces, tabs and leading/trailing spaces from each line. Clean text copied from PDFs or web pages.
Remove Empty Lines
Remove all blank lines from a text. Option to also remove lines with only spaces. Instant result.
Remove Punctuation
Remove punctuation, special symbols or digits from text. Configure what to remove and see the result instantly.