free tool · no sign-up · runs in your browser

Remove line breaks

Text copied from a PDF keeps the PDF's line endings, so every line breaks where the page did, not where the sentence ends. Paste it here to join the lines back into flowing paragraphs. Words hyphenated across a line are rejoined, and paragraph breaks can stay.

paste here

result

Free to embed. Put this remove line breaks on your blog, docs or class page.

Why PDFs break your text into lines

A PDF is a picture of a page made of text. It knows where each line sits, but not which lines make a paragraph, so copying gives you a hard line break at the end of every line, and sometimes a hyphen in the middle of a word.

What the remover does

You pasteYou get
a line that ends\nmid-sentencea line that ends mid-sentence
an exam-\nplean example
para one\n\npara twopara one (blank line) para two
extra spacesextra spaces

Other ways to fix it

In Word, Find and Replace ^p with a space. In Google Docs, turn on regular expressions and replace \n. In a code editor, search for the regex \n(?!\n). All three need care to keep real paragraph breaks, which the tool above does for you.

Remove Line Breaks: questions

Why does text copied from a PDF have line breaks?+

A PDF stores each line of text where it sits on the page. It has no idea which lines belong to the same paragraph, so when you copy it you get a line break at the end of every printed line.

Will it keep my paragraphs?+

Yes, with Keep paragraphs on. A blank line between two blocks of text counts as a paragraph break and stays. Every other line break becomes a space.

What about words split with a hyphen?+

When a line ends in the middle of a word with a hyphen, like exam- on one line and ple on the next, the hyphen and the break are removed so you get example back.

How do I remove line breaks in Word or Google Docs?+

In Word, open Find and Replace, search for ^p and replace it with a space. In Google Docs, turn on regular expressions in Find and replace and replace \n with a space. Both remove paragraph breaks too, which is why pasting here first is easier.

More free tools