Remove Line Breaks

Fix text copied from PDFs, emails and chat apps: join broken lines, keep real paragraphs, and clear out stray spaces and empty lines.

Remove Line Breaks

Before

After

Your text never leaves your device. It is cleaned in this browser tab.

Why copied text breaks into short lines

A PDF does not store paragraphs. It stores lines of text placed at fixed positions on a page, so when you copy from it, every visual line ends with a hard return. Plain text emails do something similar, wrapping long lines at around 72 to 78 characters, and text pasted from a chat window or a narrow website column often carries the same extra breaks. Paste that into a Word document, a website form or a WhatsApp message and you get ragged short lines that refuse to reflow. This tool removes those breaks so the text flows again.

The three ways to handle line breaks

  • Remove all, join with a space turns everything into one continuous line. Use it for a form field that rejects line breaks, a meta description, a spreadsheet cell, or a single long caption.
  • Keep paragraph breaks joins the lines inside each paragraph but keeps the gap between paragraphs. A paragraph is recognised by an empty line between blocks of text, which is how almost every PDF, email and document export separates them. This is the right choice for articles, letters and copied book passages.
  • Keep all line breaks leaves the lines alone and only applies the tidying options below. Use it for addresses, lists or poetry where each line matters but you still want to strip stray spaces or blank lines.

The tidying options

  • Remove extra spaces and tabs squeezes any run of spaces, tabs or non-breaking spaces into a single space. PDFs often justify text by inserting several spaces between words, and these disappear.
  • Trim each line removes spaces before the first word and after the last word of every line, which also cleans up indentation.
  • Remove empty lines deletes lines that are blank or contain only spaces. With "Keep paragraph breaks" switched on, it places each paragraph on its own line with no gap, a handy format for importing paragraphs into a spreadsheet one row at a time.

When two lines are joined, any spaces at the end of the first and the start of the second are replaced by exactly one space, so words never run together and you never get a double space at a seam, even with the tidying options switched off.

A worked example

Suppose you copy two paragraphs from a PDF report that arrive as six lines with a blank line in the middle: 68 characters, 6 line breaks and 2 empty lines in total. With "Remove all" the result is a single line of 12 words and no line breaks. With "Keep paragraph breaks" you get two clean paragraphs separated by one blank line. The counts under the boxes show the before and after numbers for characters, line breaks, empty lines and words, so you can confirm nothing was lost: the word count should stay the same.

Limits worth knowing

Words split by a hyphen at the end of a line, such as "inter-" on one line and "national" on the next, are joined with a space and keep their hyphen, because the tool cannot know whether the hyphen belongs to the word. Search the result for "- " to catch these. Tables and multi-column PDF layouts may come out in an odd reading order, which is a property of the copied text, not of this tool.

Privacy

The cleaning runs in your browser as you type. Nothing is uploaded to Ur Next Door, so contracts, medical letters and private emails are safe to paste. Use "Use result as input" to apply a second pass with different options.

Frequently Asked Questions

Why does text copied from a PDF have so many line breaks?
A PDF stores each visual line separately, so copying it puts a hard return at the end of every line. Choose Keep paragraph breaks to join those lines while keeping the gaps between paragraphs.
How does the tool know where a paragraph ends?
A paragraph ends where there is an empty line between two blocks of text. If your text has no empty lines, every line belongs to one paragraph and Keep paragraph breaks gives a single block.
Will joining lines leave double spaces?
No. Where two lines are joined, any spaces around the break become exactly one space. Remove extra spaces and tabs also squeezes runs of spaces elsewhere in the text.
What about words hyphenated across two lines?
They are joined with a space and keep the hyphen, because the tool cannot tell a split word from a real hyphenated word. Search the result for a hyphen followed by a space to fix them.
Is my text uploaded?
No. The text is cleaned by your own browser as you type and is never sent to Ur Next Door or anywhere else.