Join lines
Turn a multiline list into one text value using your own literal delimiter, with optional trimming and blank-line removal.
How it works & useful details
How to use this tool
Paste one item per line and enter the characters to place between items. An empty delimiter concatenates items directly.
How the result is calculated
The delimiter is literal: typing backslash followed by n inserts those two characters, not a newline. This does not quote or escape CSV fields; use a CSV tool for data containing commas or quotes. Skip blank lines also skips whitespace-only lines.
Line tools normalize CRLF and CR to LF. A final newline represents an empty final line; empty input has zero lines.
Up to 500,000 UTF-16 code units per input. Text stays on your device.
The result is limited to 2,000,000 UTF-16 code units.
About this tool
Join lines turns a multiline list into a single line using a delimiter you provide, such as a comma, semicolon, or space. It is the quick step between a pasted column and a value a form or query expects.
Delimiters are treated literally, so you can use sequences the tool does not need to escape for you. Optional trimming and blank-line removal keep the result clean.
How to use it
- Paste the multiline list.
- Enter the literal delimiter to join with.
- Enable trimming or blank-line removal if your data needs it.
- Copy or download the joined result.
Worked example
Joining
red
green
bluewith the delimiter ", ", trimming, and skipping blank lines gives red, green, blue. Without trimming, the leading space before "green" would remain, producing "red, green, blue" with a double space.
Handy delimiters
- ", " for readable lists in emails and documents.
- "," for values that go into a URL parameter or a command-line flag.
- " OR " to build search queries from a list of terms.
- "|" for simple regular-expression alternations, after escaping any special characters.
- An empty delimiter to concatenate fragments directly.
The delimiter is literal: typing \n inserts a backslash and the letter n, not a line break. The tool also does not add quotes. To build a SQL IN list such as 'a', 'b', 'c', first wrap each line in quotes with the regex replace tester, then join with ", ". For values that contain commas or quotes, use a CSV tool so fields are escaped correctly.
Frequently asked questions
Can I wrap each line in quotes?
The tool joins lines with your delimiter; quoting is not applied automatically, since quoting rules differ between CSV, SQL, and other targets.
Is the delimiter escaped?
No. It is inserted exactly as typed, so choose a delimiter appropriate for where the result will be used.
What is the limit?
Up to 500,000 characters of text.
How do I split a comma-separated list back into lines?
Use find and replace: search for ", " and replace it with a line break, which you can paste or type into the multiline replacement field.
