How do you remove line breaks from a text?
To remove line breaks, paste your text and choose how to treat them: replace each break with a space, remove it completely, join lines but keep the paragraphs, or delete only the empty lines. Text copied from PDFs, emails and websites often has a hard break at the end of every line, and this tool turns it back into flowing paragraphs. It can also collapse extra spaces, and it works locally in your browser.
How to remove line breaks from text
- 1
Paste your text with unwanted line breaks into the input box.
- 2
Choose Replace with a space, Remove completely, Keep paragraphs or Remove empty lines only.
- 3
Turn on Collapse extra spaces if the text has double spaces.
- 4
Copy the cleaned text.
Key features
Four cleaning modes
Join lines with spaces, merge without spaces, keep paragraphs apart, or only strip blank lines.
Fixes text from PDFs
Repair paragraphs that were broken at the end of every line when copied from a PDF or an email.
Extra spaces and trimming
Collapse repeated spaces and trim each line to leave neat, even text.
Works with any system
It understands Windows, Mac and Linux line endings.
Frequently asked questions
How do I remove line breaks from text copied from a PDF?
Paste the text and use Keep paragraphs. Lines inside a paragraph are joined with spaces, and blank lines still separate the paragraphs.
How do I remove empty lines?
Select Remove empty lines only. Lines with text stay on their own line, and blank lines are deleted.
What is the difference between removing a line break and replacing it with a space?
Removing it joins the last word of one line to the first word of the next. Replacing it with a space keeps the words separate, which is what you need in most cases.
How can I remove double spaces?
Turn on Collapse extra spaces. Any run of two or more spaces or tabs becomes a single space.
Does it work with Windows and Mac line endings?
Yes. Line breaks from Windows (CRLF), Linux (LF) and older Mac systems (CR) are all recognized.