Skip to content

Join lines

Paste several lines and get them back as one line, joined with a single space. Nothing else in the text changes, hyphens included.

Free, no sign-up. Runs in your browser. Nothing you type or upload is sent to us or stored.

At a glance

Separator
One space between joined lines
Indents
Spaces and tabs at the start and end of each line are trimmed before joining
Hyphens
Left as they are on this page, so "well-" + "known" isn't merged into one word
Vim
J joins lines and inserts one space in place of each line end (gJ adds no space)
Source: vimhelp.org, checked 2026-11
Notepad++
Edit > Line Operations > Join Lines replaces the line endings in a selection with a single space
Source: npp-user-manual.org, checked 2026-11

Share the clean text as a link

Paste the result into Liite's quick paste and get a short link you can send to anyone. No account needed.

Paste and share

Join lines: what to know

This page starts the remove line breaks for this case. For every option and how to use it, see the remove line breaks.

When joining lines helps

Some text needs to be on one line to work: a SQL query pasted into a log search, a long command for a terminal, an address for a form field that won't accept line breaks, or a list of tags. The example on the page is a short SQL query spread over five indented lines.

Unlike the main remove line breaks tool, this page joins everything, including blank lines, and doesn't rejoin hyphenated words. That keeps code, file paths and ranges like "2025-" + "2026" exactly as you wrote them.

Joining with something other than a space

Pick Replace with to join lines with a comma, a semicolon, a pipe or anything you type. Use \t for a tab, which pastes into a spreadsheet as separate cells across one row.

Text editors can do it too. In Vim, J joins the line below onto the current one. In Notepad++, select the lines and choose Edit > Line Operations > Join Lines. Use this page when the text isn't in an editor, or you want the result without opening one.

Questions

How do I merge two lines into one?

Paste both lines in the box. They come back as one line with a space between them, ready to copy.

How can I merge two paragraphs into one?

Use this page as it opens: blank lines are dropped too, so two paragraphs become one line. To keep paragraphs apart, switch to keep paragraphs.

How do I join lines in Notepad++?

Select the lines, then choose Edit > Line Operations > Join Lines. Notepad++ replaces each line ending in the selection with a single space, as this page does.