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.

Original text 0 lines
Replace line breaks with:
Joined text 0 chars
Private by design. Your text is processed only in this browser using pure vanilla JavaScript. Nothing is uploaded and no external libraries are used.
About this tool

How to use the Remove Line Breaks tool

  1. 1
    Paste your text Paste the text containing unwanted line breaks into the left panel.
  2. 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. 3
    Copy the result The right panel updates instantly. Copy the joined text or download it as a .txt file.

Special features

Instant joining Line breaks are removed in real-time as you paste or type, with no page reloads required.
Custom replacements Join lines with a space, a comma, a dash, or any custom character you need.
Space collapsing Automatically removes double spaces and tabs that often appear after removing line breaks.
Live stats See the line count of your original text and the character count of your joined text.
100% private No upload, no account, no analytics, no cookies, no external libraries. Your text stays in the browser.
Offline capable Because the tool is built entirely with vanilla JavaScript, it works completely offline after the page loads.

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.