Remove line breaks (join into one line)
Joins all lines into one. You can choose the separator placed between them.
Example
- Options used
- Join withCustom
- Separator
,
Input
alice@example.com bob@example.com carol@example.com
Output
alice@example.com, bob@example.com, carol@example.com
Symbols in examples: ⇥ tab · · trailing space · ⍽ NBSP · □ full-width space · ◌ zero-width character
Open this operation in the toolWhat it does
Joins every line of the text into a single line. Blank lines are skipped, so the separator never appears twice in a row.
Options
- Space: puts one space between lines and trims each line before joining. Use it to merge sentences into a single paragraph.
- Nothing: joins lines with nothing in between. Use it for Japanese or Chinese text that has no spaces between words, or to rebuild a long string that was split across lines (a key, a hash, Base64).
- Custom: inserts the separator you choose.
,gives a comma-separated list,|gives a regex alternation, and\tgives a single tab-separated row.
When to use it
Most often used to join a vertical list with commas so you can paste it into an email recipient field or an SQL IN clause. It is also handy for turning a list of hashtags into one line, or turning sentences broken across lines into one paragraph.
To remove line breaks within paragraphs while keeping the paragraph breaks, use Repair PDF line breaks instead. If the values need to be wrapped in quotes, add Add text to the start and end of lines in an earlier step.