Remove line breaks from text
Paste text with lines broken in the middle of sentences, from a PDF, an email or a narrow column. You get it back as clean paragraphs or as one long line. It all happens in this tab and nothing is uploaded.
How the line breaks are removed
Text copied from a PDF keeps the line ends of the page it came from, so every line stops where the PDF's column stopped. Plain text emails are often wrapped too, because the email standard asks for lines of no more than 78 characters. Paste either into a document or a form and you get a hard break in the middle of each sentence.
With Keep paragraphs on, an empty line marks the end of a paragraph. The lines inside each paragraph are joined with a space, and one empty line stays between paragraphs. Remove all joins everything into a single line, which suits a form field, a spreadsheet cell or a list you want separated by commas.
The spaces at the start and end of every line go before the lines are joined, so you never get two spaces where a break was. Windows (CR LF), Unix and macOS (LF) and old Mac (CR) line endings are all handled, and so are the Unicode line and paragraph separators some PDFs use.
Words split by a hyphen
Books, papers and other justified PDFs often split a long word at the end of a line, leaving "exam-" on one line and "ple" on the next. Turn on Rejoin words split by a hyphen and the tool drops the hyphen and joins the two halves whenever the next line starts with a lower-case letter.
It is off by default because it cannot tell a split word from a real compound that happens to break at a line end, like "well-" and "known", which would come out as "wellknown". After using it, check the compound words.
Removing line breaks in Word, Excel and Notepad++
If the text is already in one of these apps, you can join the lines there.
Word
- Press Ctrl+H for Replace. Put ^p (paragraph mark) or ^l (manual line break, a lower-case L) in Find what, type a space in Replace with, then choose Replace All. The Special menu in the dialog inserts the same codes.
- To keep paragraphs, first replace ^p^p with a placeholder such as ##, then replace ^p with a space, then replace ## with ^p^p.
Sources: Find and replace text, Search strings for special characters
Excel
- A line break inside a cell is the line feed character, CHAR(10).
=SUBSTITUTE(A2,CHAR(10)," ")puts a space in place of each one. =CLEAN(A2)also removes them, along with the other nonprinting characters 0 to 31, but it leaves no space between the words.
Sources: SUBSTITUTE function, CLEAN function
- A line break inside a cell is the line feed character, CHAR(10).
Notepad++
- Select the lines and choose Edit > Line Operations > Join Lines. For the whole file, Edit > Blank Operations > EOL to Space replaces every line ending with a space.
Sources: Notepad++ User Manual
Checked against Microsoft's and the Notepad++ documentation on 1 December 2026.
Questions
How do I remove line breaks from text copied from a PDF?
Paste the text into the box on this page with Keep paragraphs on. The lines inside each paragraph are joined with spaces and the paragraphs stay apart. If the PDF splits words with hyphens at line ends, also turn on Rejoin words split by a hyphen.
How do I turn a list into one line separated by commas?
Paste the list with one item per line, choose Remove all and pick Comma under Replace each break with. Apples, pears and plums on three lines come out as "apples, pears, plums". Other lets you use any separator, such as a semicolon or a pipe.
What is the difference between a line break and a paragraph break?
A line break ends a line and a paragraph break ends a paragraph, but in plain text both are the same newline character. That is why this tool treats an empty line, two newlines in a row, as the end of a paragraph. In Word they are different marks: ^l for a manual line break and ^p for a paragraph mark.
Can I remove the formatting as well?
Yes. The text you paste here is already plain, so fonts, colours and links are dropped. To clean up the formatting but keep the line breaks, use Paste without formatting.
Is the text I paste sent or saved anywhere?
No. The line breaks are removed by JavaScript inside this tab, and the page never sends or stores your text. It only remembers your options, in this browser. Page views are counted with Cloudflare Web Analytics, which never sees what you paste.