Join lines into one

Merges every line into a single line with the separator you choose.

Press the button and every line becomes one line, with your separator between them. The default separator is a single space, which is what you want when text has been broken across lines and should read as continuous prose.

The wrapped-text problem

Text copied from a PDF, an email or a terminal often arrives with a line break every seventy or eighty characters. Those breaks were a display decision, not part of the content, and they cause trouble everywhere the text goes next: it will not reflow in a narrow column, sentences break mid-phrase in a slide, and search fails when the phrase you are looking for straddles a break.

Joining with a space restores the flow. "Trim each line first" is on by default, which matters here — without it, lines that already end in a space produce double spaces at every join, and you end up cleaning up after the cleanup.

If the breaks separate paragraphs rather than wrapped lines, joining everything makes one enormous paragraph. The line break remover can keep paragraph breaks while removing the wrapping, which is usually the better tool for a document.

Separators

Type anything you like. A space for prose. A comma and a space for a readable list. A comma alone for code. A semicolon for email recipients. \t gives a real tab, which pastes into a spreadsheet as separate cells. \n gives a newline, which is a useful way to normalise line endings without changing anything else.

For lists specifically, the list converter covers the same ground with extras — quoting each value, removing duplicates — that matter when the destination is SQL or JSON.

And back again

The second button splits a joined line back into lines using the same separator, so the operation is reversible if you change your mind or need to work in the other direction.

The third wraps long text to a fixed width, which is the opposite job: taking one long line and breaking it at a sensible column for a terminal, a plain-text email or a code comment. It breaks at word boundaries rather than mid-word.

Doing it without this tool

Word: Find & Replace, searching ^p and replacing with a space. It joins paragraphs indiscriminately, so the whole document becomes one block unless you work section by section.

Excel: =TEXTJOIN(" ", TRUE, A1:A100) in Excel 2019 and later.

Notepad++: Edit → Line Operations → "Join Lines" (Ctrl+J) joins selected lines without a separator, so words run together and you have to add spaces afterwards.

Command line: tr '\n' ' ' < file.txt or paste -sd' ' - < file.txt.

Try:
0Words
0Characters
0No spaces
0Sentences
0Paragraphs
0Lines
0Pages
0Reading
0Speaking

Runs entirely in your browser. Your text is never uploaded — open DevTools, Network tab, and you will see zero requests while you use this tool.

How to use it

  1. Paste your text into the box.
  2. Set the separator — a space for prose, a comma for a list.
  3. Press "Join into one line".
  4. To reverse it, press "Split back into lines" with the same separator.

Related tools

Add line numbersNumbers every line, in the format you choose — and removes numbering too.Truncate textShortens each line to a maximum length, optionally without cutting a word.Text repeaterRepeats your text as many times as you want, with any separator.Cut charactersCuts a fixed number of characters from the start or end of every line.Cursive textHandwriting-style letters you can paste anywhere plain text goes.Upside down textFlip a line so it reads the other way up. Copy and paste anywhere.Instagram caption lengthThe hard limit is 2,200 characters. The one that matters is the 125 you see…

See all text tools →

Frequently asked questions

Why do I get double spaces when joining?

Because the original lines ended with a space. Keep "Trim each line first" ticked and each line is cleaned before joining, so you get single spaces.

How do I join with a tab or a newline?

Type \t for a tab or \n for a newline in the separator field. A tab separator is how you paste a joined line into a spreadsheet as separate cells.

How do I keep paragraph breaks and only remove wrapping?

Use the remove line breaks tool, which has an option to keep paragraph breaks. Joining everything here produces a single line by design.

Can I split the line back afterwards?

Yes, the second button splits on the same separator, so the operation is reversible.

How do I wrap long text to a fixed width instead?

Press "Wrap to a width". It breaks lines at word boundaries at the column you set, which is the opposite operation to joining.