Remove Line Breaks: join text lines into a single paragraph
Paste your text with line breaks and instantly join them into a single paragraph. Choose whether to replace breaks with spaces, commas, or nothing at all. Everything runs in your browser.
How to use the Remove Line Breaks tool
-
1
Paste your text Paste the text containing unwanted line breaks into the left panel.
-
2
Choose your options Select how to replace the line breaks. The default is a space, but you can choose a comma, nothing, or type a custom character. Enable "Collapse extra spaces" to clean up accidental double spaces.
-
3
Copy the result The right panel updates instantly. Copy the joined text or download it as a .txt file.
Special features
Frequently asked questions
What is the difference between a hard return and a soft return?
A hard return is what happens when you press the 'Enter' key. It creates a new paragraph and is represented by a carriage return and line feed (\r\n on Windows). A soft return, created by pressing 'Shift + Enter', creates a line break without starting a new paragraph. This tool removes both.
Why do copied PDFs have so many line breaks?
PDFs are designed for printing, not text editing. They do not store paragraphs as continuous strings; instead, they store text based on its physical position on the page. When you copy text from a PDF, the browser inserts line breaks wherever the line visually ended on the page, resulting in broken sentences.
What does 'Collapse extra spaces' do?
When you replace line breaks with a space, you might end up with multiple spaces in a row (for example, if the original text had spaces at the end of a line). Enabling this option runs a secondary regex pass that converts any sequence of multiple spaces or tabs into a single standard space.
Is my text safe?
Yes. Your text is processed entirely in your browser. It is never uploaded, stored, or sent anywhere. The tool does not use cookies, analytics, or localStorage.
Does the tool work offline?
Yes. Because the tool is built entirely with vanilla JavaScript, it works completely offline after the page loads.