go-supertools
Text Tools

Line Break Remover

Remove every line break from text and join it into one continuous line.

Runs in your browser Your input never leaves your device.

0 characters | 0 words

Report a problem with this tool

About this tool

This tool turns text that is split over several lines into one continuous line. Line breaks (newlines and carriage returns) are replaced by a single space, blank lines are dropped and spaces at the start and end of each line are trimmed, so words from neighboring lines do not run together. Nothing else in the text is changed. If you want lines joined with a comma, a tab or another separator, use the Text Line Joiner instead. The conversion happens as you type and runs in your browser.

How to use it

  1. Paste your text into the input box.
  2. The text without line breaks appears in the output.
  3. Press Copy to use the result.

Example

Each line is trimmed and the lines are joined with one space, so the trailing space on the first line does not become a double space.

Input
Hello 
World
Result
Hello World

Where unwanted line breaks come from

Text copied from a PDF, an email or a terminal often carries a hard line break at the end of every visual line. Pasted into a form, a spreadsheet cell or a chat, it shows up broken into short pieces.

There are three kinds of line ending. Windows uses CR LF, Linux and macOS use LF, and very old Mac files use CR alone. This tool treats all three the same, so mixed text is joined cleanly.

What the tool does to each line

Spaces inside a line are left alone, so double spaces in the middle of a sentence stay as they are.

  1. Splits the text at every line ending (CR LF, LF or CR).
  2. Trims spaces and tabs from the start and end of each line.
  3. Drops lines that are empty after trimming.
  4. Joins what is left with a single space.

Doing the same in other programs

Excel or Google Sheets
=SUBSTITUTE(A1,CHAR(10)," ") replaces line breaks inside a cell with a space.
VS Code and most code editors
Open Find and Replace, turn on regular expressions, search for \n and replace with a space.
Microsoft Word
In Find and Replace, ^p finds paragraph marks and ^l finds manual line breaks. Replace them with a space.

Common problems

A hyphenated word split over two lines stays split
A word broken with a hyphen at a line end, like inter- national, becomes "inter- national" because the tool only joins lines with a space. Fix those few by hand.
Paragraph breaks disappear too
All breaks are replaced, including blank lines between paragraphs, so paragraphs merge into one block. To keep paragraphs, use the Text Cleaner instead.

Frequently asked questions

Is my text uploaded anywhere?

No. The text is processed by script in your browser tab and is not sent to a server.

Can I join lines with a comma instead of a space?

Not with this tool, it always uses one space. The Text Line Joiner lets you pick a comma, a tab or another separator.

Will this remove spaces between words?

No. Only line endings and the spaces at the start and end of each line are removed. Words on neighbouring lines are separated by one space.