Remove Line Breaks
Updated Free mock REST & WebSocket APIs
Text copied from a PDF, an email or a terminal often has a hard line break at the end of every line. Paste it here to join the lines back into flowing paragraphs. Blank lines between paragraphs are kept unless you turn that off.
🔒 Runs in your browser — nothing you paste is uploaded.
How to remove line breaks
- Paste the text with unwanted line breaks.
- Leave Keep paragraph breaks on to keep blank-line paragraph breaks, or turn it off to put everything on a single line.
- Copy the result and paste it into your document, form or email.
Why PDFs add line breaks
A PDF stores text as positioned lines, not paragraphs. When you copy from it, each visual line becomes a line of text ending in a line break. Paragraph breaks are usually copied as a blank line, which is why Keep paragraph breaks can rebuild paragraphs correctly: single line breaks are joined with a space, and blank lines stay as paragraph breaks.
Doing it in other apps
- Microsoft Word: Find & Replace with wildcards. Replace
^p^pwith a placeholder like##, then^pwith a space, then##with^p. - VS Code / regex: find
(?<!\n)\n(?!\n)and replace with a space. Test it in the regex tester. - Terminal:
tr '\n' ' ' < in.txtjoins everything into one line.
Related tools
Embed this tool on your site
Browse all embeddable tools →Free for blogs, HR, payroll and contractor sites: copy one snippet — the widget sizes itself and matches your colors.
Get the embed code
Frequently asked questions
Is my text uploaded anywhere?
No. Everything runs in your browser, so your text never leaves your device. Nothing is logged or stored on a server.
Will words be glued together?
No. Each line break becomes a single space, and extra spaces at the end of lines are collapsed, so words never merge and you won't get double spaces.
What about words hyphenated at the end of a line?
Hyphens are kept as they are, because the tool can't tell 'well-\nknown' from a hyphen that was split across lines. Search for '- ' afterwards to fix those.
Does it handle Windows line breaks (CRLF)?
Yes. Windows (\r\n), old Mac (\r) and Unix (\n) line endings are all handled.
Your business here? Sponsor this tool from $16/week. See placements