Remove Line Breaks
- 43
- Characters in
- 43
- Characters out
- 3
- Lines joined
The converter moves between text broken across many lines and text on one line, in both directions. Joining fixes the hard line breaks that PDFs and email clients leave in copied paragraphs; splitting turns a comma-separated string into one item per line so it can be pasted into a list.
How it works
Joining splits your text on line breaks and reassembles it with the separator you choose. Splitting does the reverse: it breaks on your delimiter and joins with line breaks. The two directions share the same trim and drop-empty options, because both need them.
- Join with a space for prose. A paragraph copied from a PDF has a break at the end of every printed line, and joining with a space restores the sentences.
- Join with nothing at all when the breaks fall inside a single value, such as a long token wrapped across lines.
- Join with a comma to turn a list into a comma-separated string for a query or a config field.
- Trim each piece removes leading and trailing spaces from each line before joining, which prevents double spaces where a line already ended in one.
All three line-ending conventions are handled, so text from Windows, macOS and Unix behaves identically. The "use this as the input" button feeds the result back in, which is how you convert a comma-separated string to lines and then to a pipe-separated string.
Examples
A paragraph copied from a PDF
Text
The quick brown fox / jumps over / the lazy dog
Result
The quick brown fox jumps over the lazy dog
Joined with a space. The line breaks came from the PDF page layout and mean nothing in the text itself.
A comma-separated list into lines
Text
red, green, blue, yellow
Mode
Split on ", "
Result
red green blue yellow
One value per line, ready to paste into a spreadsheet column or another line-based tool.
Lines into a query string
Text
Four IDs, one per line
Mode
Join with a comma
Result
id1,id2,id3,id4
With trim on, each line loses its trailing space first, so the result has no stray gaps around the commas.
Frequently asked questions
Why does my joined paragraph have double spaces?
Because the original lines ended with a space before the break, and joining with another space gives two. Turn on "trim each piece" and each line is stripped before joining, leaving exactly one space between words.
Can I get rid of line breaks without adding anything?
Yes. Choose "nothing at all" as the separator. Use it when a single value has been wrapped across lines, such as a long API key. Do not use it on prose, or the last word of each line will run into the first word of the next.
Does it handle Windows line endings?
Yes. Carriage-return-newline, bare newline and bare carriage return are all recognised, so text from any operating system joins the same way. Output uses plain newlines.
How do I convert between two different delimiters?
Split on the first delimiter, press "use this as the input", then join with the second. Two passes, because going straight from commas to pipes would also match delimiters inside your values.
Will it break my paragraphs apart?
Joining collapses everything into one line, including across paragraph breaks. If you want to keep paragraph separation, remove the blank lines first with the empty-line tool set to collapse, then join in sections.