Free tool — runs in your browser

Remove line breaks

Strip the line breaks out of pasted text and join it back into flowing prose, keeping paragraph gaps if you want and collapsing the leftover double spaces.

Your text

Result

How to join

Replace each break with

Blank lines stay as paragraph boundaries; single breaks inside a paragraph are joined.

What changed

Line breaks removed0

Rejoining text that arrived in pieces

Text copied out of a PDF, an email or a code editor arrives broken at whatever width the original was displayed in. Pasted into a field that wraps by itself, those breaks turn a paragraph into a ragged column.

  1. Paste the broken text. It is processed in the page, which matters for anything from a contract or a document under embargo.
  2. Leave paragraph gaps on for prose. Lines inside a paragraph are joined and the blank line between paragraphs stays, which is almost always what you wanted.
  3. Turn paragraph gaps off when you need everything on one line, such as a value going into a single cell or a single field.
  4. Pick what replaces the break. A space is right for prose, and nothing is right for a word that was split across a line by hyphenation.
  5. Leave the collapse option on to clean up the double spaces that appear where a line already ended in a space.

The options and what each one does

Four small decisions cover nearly every version of this problem, and the difference between them is the difference between readable prose and a sentence with its words stuck together.

  • Keep paragraphs on: a blank line is treated as a paragraph boundary and preserved, while single breaks inside a block are joined.
  • Keep paragraphs off: every break goes and the whole input becomes one continuous line, which is what a spreadsheet cell or a CSV field needs.
  • Join with a space: the normal choice for prose, where each line was a continuation of a sentence.
  • Join with nothing: for text broken mid-word, where a space would leave the halves separated instead of reunited.
  • Join with a comma: for a list that was one item per line and needs to become an inline list.
  • Collapse spaces: runs of two or more spaces become one, which cleans up the joins where the original lines already ended in a space.

Where the stray breaks came from

Knowing the source tells you which option to pick, because each source breaks text in a characteristically different way and needs a different join.

  • PDFs have no paragraphs. Every visual line is a separate run of text, so a copied page arrives broken at the column width and often with the hyphenation left in.
  • Plain text email wraps at 72 to 78 characters by convention, which is why forwarded messages arrive with a hard break every dozen words.
  • Code editors and terminals wrap at the window, so a long line copied from a terminal comes back with breaks where the window happened to end.
  • Word processors use a paragraph mark that copies as a break, and a manual line break inside a paragraph copies as a different one, so both turn up in the same paste.
  • Subtitle and transcript exports break on timing rather than on sense, which is why a transcript reads as fragments until the breaks are removed.
  • Windows text uses two characters for a break where other systems use one, and this tool handles both without leaving stray characters behind.

When the line breaks should stay exactly where they are

Removing breaks is destructive in the sense that the original layout cannot be recovered afterwards, so there are places to leave well alone.

  • Poetry, lyrics and addresses are line-broken on purpose, and flattening them removes the meaning that the shape was carrying.
  • Code is whitespace-sensitive in several languages, and joining lines in Python or YAML does not produce a longer line, it produces something that will not run.
  • A social caption written with deliberate paragraph spacing wants the opposite treatment, and there is a generator in this catalogue that keeps those breaks alive through a composer.
  • Markdown uses two trailing spaces before a break to force a line break, so removing breaks there changes how the document renders.
  • CSV data with quoted fields can contain legitimate line breaks inside a value, and flattening the whole file corrupts the rows rather than tidying them.
The rest of the job

You just fixed one post. Now do the month.

The remove line breaks solves one piece of one post. OctoSpark plans, writes and schedules the whole calendar across every network you use, publishes it for you, and reports what actually performed.

  • One calendar for every network
  • Schedule once, publish everywhere
  • Drafts written in your own voice
  • See what actually performed
Open the full sign-up page

No card needed. These tools stay free either way.

Frequently asked questions

How this tool works, what it cannot do, and what happens to what you put into it.

  • How do I remove line breaks but keep my paragraphs?

    Leave the keep paragraphs option on. A blank line is treated as a paragraph boundary and left in place, while the single breaks inside each block are joined into flowing text. That is the setting for anything copied out of a PDF or an email that you still want to read as prose.
  • Why did my words run together after removing the breaks?

    The join was set to nothing rather than to a space. Joining with nothing is for text broken in the middle of a word, which is common in PDF copies with hyphenation. For ordinary prose where each line continued a sentence, join with a space instead.
  • Does it remove extra spaces as well?

    Only if you leave the collapse option on, and then only runs of two or more spaces, which become one. It is worth leaving on because lines that already ended in a space produce a double space at every join, and those are tedious to find by hand afterwards.
  • Does this work with text copied from a PDF?

    Yes, and that is the most common reason people need it. A PDF has no paragraphs, only visual lines, so a copied page arrives broken at the column width. Keep paragraph gaps on, join with a space, and check for hyphens left at the ends of the original lines, which need joining with nothing instead.
  • Is my data private?

    Yes. This tool does its work in your browser, so whatever you type, paste or upload stays on your device. Nothing is sent to our servers, which is also why it keeps working if you go offline after the page has loaded.
  • Is this really free?

    Yes. Every tool here is free with no account, no credit card and no usage cap. They exist so that the people who need our scheduling product find us, which only works if the tools are genuinely useful on their own.
  • Do I need an account?

    No. Open the page and use it. An account is only for OctoSpark itself, where you plan, schedule and publish a whole calendar rather than fixing one post at a time.
  • Can I use the output commercially?

    Yes. Anything you produce here is yours, including for client and commercial work. We claim no rights over it and we do not watermark it.