Skip to content
helpyself

Remove Line Breaks

Local only — nothing is uploaded unless you save or share it.

Remove line breaks from text that was hard-wrapped, and keep the paragraphs.

  1. Paste the text with the unwanted line breaks in it.
  2. Leave it on "keep paragraphs", or switch to one long line if that is what you need.
  3. Copy the result, or save it to your account.

Share a link

Saves this to your files and gives you a web address anyone can open. It stops working on its own.

Link lasts
Save this tool

Keep Remove Line Breaks handy

Bookmark it

About this tool

Text copied out of a PDF, an email or a terminal has a line break at the end of every line rather than at the end of every paragraph. Paste it into anything that wraps text itself and it comes out as a ragged column. This puts it back together. The distinction that matters is which breaks to remove. Strip all of them and the paragraphs go too, which is what the obvious find-and-replace does and why its result is a wall of text nobody can read. So a blank line is treated as a paragraph boundary and kept, while the breaks inside a paragraph are collapsed — which is what it means to reflow text rather than simply flatten it. There is an option to delete line breaks entirely if that is genuinely what you want, and it is the only setting that will remove paragraph breaks as well. Two things get destroyed by a cruder version of this, so both are handled. A justified PDF hyphenates words across the line — "inter-" at the end of one line and "national" at the start of the next — and joining those with a space gives "inter- national". And a bulleted list joined into a sentence loses the only structure it had, so a line that begins a list item stays on its own line. It all happens in your browser. Nothing you paste is uploaded.

Frequently asked questions

How do I remove line breaks but keep my paragraphs?

That is what this does by default. A blank line between two blocks of text is treated as a paragraph break and kept; every other break is removed and the lines either side are joined with a space. If your text has no blank lines in it at all — some PDF exports are like this — then it is one paragraph as far as anything can tell, and it comes back as one.

How do I remove hard returns from a pasted document?

The same way — a hard return is what Word calls the break you get from pressing Enter, and that is exactly what this collapses. If the document came out of a PDF or an email, every visual line ends in one of them, and the tool keeps only the ones with a blank line after them.

Why does text from a PDF break in the middle of sentences?

Because a PDF has no paragraphs. It has glyphs at positions on a page, and when you copy from it the reader reconstructs lines from where the text physically sat — so you get a break at the end of each visual line. The same thing happens with plain-text email, which is traditionally wrapped at 72 characters, and with anything printed by a terminal.

What happens to words split with a hyphen?

They are put back together: "inter-" followed by "national" becomes "international", and the page tells you how many it mended. It only does this where the next line starts with a lower-case letter, because a hyphen at the end of a line can be a real one — in "well-Known" the hyphen belongs to the word and removing it would quietly change the text. You can turn the whole behaviour off.

Will it ruin my bulleted list?

No. A line starting with a dash, a bullet, a number followed by a dot, or a letter followed by a bracket is treated as the start of a list item and keeps its own line — and if that item was itself wrapped over two lines, the continuation is joined onto it. Turn the option off and list lines are joined like anything else.

Can I join the lines with nothing instead of a space?

Yes, and there is a reason it is an option rather than a setting nobody needs: Chinese, Japanese and Thai are written without spaces between words, so inserting one at every removed break puts a space in the middle of a word. Set "join with" to nothing for those.

Is my text uploaded?

No. The whole thing runs in your browser — there is no request to make, and it works with the network off once the page has loaded. Saving the result to an account is the one thing that sends it anywhere, and that only happens when you press Save.

Help improve this tool

Found a bug, want a change, or need a tool we don't have?

/remove-line-breaks

↑↓ to move · Enter to open · Esc to close