text tool

Remove line breaks

Paste text with hard line breaks, such as text copied from a PDF or an old email, and the breaks inside each paragraph are joined into flowing sentences. Blank lines stay as paragraph breaks unless you choose one block, and a word split by a hyphen at a line end is rejoined.

Loading the tool…

How it works

  1. 1

    Paste the text

    Copy from a PDF, an email or a terminal and paste it into the first box. The result updates as you type.

  2. 2

    Choose how paragraphs are kept

    Keep paragraphs treats a blank line as a paragraph break and joins everything else. One block of text joins the lot into a single paragraph.

  3. 3

    Decide on hyphens and lists

    Rejoin the word turns exam- and ple on two lines back into example. Keep the hyphen joins the lines but leaves well-known as it was. List items stay on their own lines while that box is ticked.

  4. 4

    Copy the result

    Copy it, download it as a .txt file, or use it as the input for another pass. Nothing is uploaded and nothing is stored, ever.

Where hard line breaks come from

A PDF stores each line of a paragraph as a separate run of text at a fixed position, so copying it gives you a line break wherever the page wrapped. Plain text email has a similar habit: the email standard asks for lines of no more than 78 characters, so many mail programs and mailing list archives break every line by hand. Text copied from a terminal, a code comment or a fixed width report does the same. Paste any of it into a document or a form and the breaks stay, leaving a ragged column.

How the joining works

The text is split into paragraphs at blank lines. Inside each paragraph, every line is joined to the one before with a single space, trailing spaces are dropped, and runs of spaces and tabs become one space while Tidy double spaces is ticked. When a line ends in a hyphen straight after a letter or digit, the next line is joined with no space. The hyphen is removed if the next line starts with a lower case letter and Rejoin the word is chosen; otherwise it is kept, so COVID- and 19 on two lines become COVID-19.

Text copied from a PDF

PDFs are the most common source of broken lines, and they bring two more problems. Justified text is often hyphenated at line ends, which the rejoin option handles. Headers, footers and page numbers come along with the text, and they land in the middle of a paragraph when it crosses a page; delete them before or after joining. If the PDF has two columns, copy one column at a time, or use the PDF text extractor, which reads two column pages in order.

Limits worth knowing

The only paragraph signal in plain text is a blank line, so text that separates paragraphs with a single break comes out as one long paragraph; add blank lines first, or join everything and split by hand. Rejoining hyphens is a guess: exam- before ple is a broken word, but well- before known is a real compound, and the tool cannot tell the two apart, so choose Keep the hyphen for text full of compounds. A wrapped line that happens to begin with a number and a full stop is treated as a list item while that box is ticked.

Clean text for a prompt

Joined text works better as the source for a generated document too. The document generator takes a prompt of up to 10,000 characters, and a paragraph without stray breaks is far easier to read and trim in the prompt box before you send it.

Limits

  • Hyphenated words split across lines are rejoined only when the hyphen is at the end of a line and the next line starts with a lower case letter. A real compound such as well-known split at its hyphen is rejoined too, unless you choose Keep the hyphen.
  • A paragraph break is a blank line. Text with no blank lines between paragraphs comes out as one paragraph.
  • While Keep list items is ticked, lines that start with a bullet, a dash, an asterisk or a number such as 1. or 2) stay on their own lines, so a wrapped line that happens to start that way stays apart too.

What it does not do

  • It does not fix spacing inside words that a PDF split apart.
  • It does not remove page headers or page numbers copied along with the text.
  • It does not change spelling, capitals or punctuation.

Questions people ask

How do I remove line breaks in Word?

In Word, open Find and Replace, search for ^p and replace it with a space. That joins every line, including the paragraph breaks you wanted to keep, so the usual workaround is to replace ^p^p with a placeholder first, then ^p with a space, then the placeholder back with ^p. Pasting here does the same in one step and also rejoins hyphenated words.

Will it remove the breaks between paragraphs too?

Only if you ask it to. With Keep paragraphs chosen, any blank line, even one holding only spaces, is treated as a paragraph break and comes out as a single blank line. Choose One block of text and the paragraph breaks go too, which suits a form field or a spreadsheet cell that takes one line, though list items still keep their own lines while that box is ticked.

Why are there still breaks in my result?

There are two likely reasons. Lines that start with a bullet, a dash or a number such as 1. stay on their own lines while Keep list items on their own lines is ticked, so untick it to join them. And a blank line, even one with only spaces on it, counts as a paragraph break, so choose One block of text to join across those too.

Does it keep bold, italics and links?

No. It works on plain text, so bold, italics, links and fonts are not carried in or out, and pasting from a PDF or a web page gives you the words only. If you need the formatting, join the lines here, paste the result back, and reapply the styles, which is usually quicker than fixing every line break by hand.

Is the text I paste kept anywhere?

No. Everything runs in this page on your device, and no network request carries your text, which you can check in the network tab of your browser. Nothing is stored either: there is no history and no saved draft, so a refresh clears both boxes. That matters for contracts, medical letters and anything copied out of a private PDF.

Turn the clean text into a document

Take what you made here into documents.

Create a document with OneCraft

More tools like this

Sources

Written and checked by the OneCraft team. Last checked .