Join and Split Lines
Join lines into a comma-separated list or split a list into lines. Add quotes, trim items and build SQL IN lists in your browser. Free and private.
How to use Join & Split Lines
- 1Paste a list with one item per line, or a delimited list to split.
- 2Choose Join lines or Split into lines and pick the delimiter and options.
- 3Copy the result or download it.
What makes it better
- Join with comma, semicolon, pipe, space, tab or a custom delimiter
- Wrap items in single or double quotes
- SQL IN list preset with quotes, commas and parentheses
- Trim items and skip empty ones in both directions
About Join & Split Lines
Join and Split Lines converts between a column of values and a single delimited list. Join lines with a comma, semicolon, pipe, space, tab or your own delimiter, optionally wrapping each item in quotes. Split does the reverse, and the SQL IN list preset builds ('a', 'b', 'c') in one click.
Common uses
- Turn a column of IDs copied from a spreadsheet into a SQL IN (...) list.
- Convert a list of tags or emails into a comma-separated line for a form field.
- Split a long semicolon-separated string into one item per line to review it.
- Prepare values for a function call, array literal or command line.
Example
Input
1001 1002 1003 1004
Result
1001, 1002, 1003, 1004
Good to know
- When quoting, any quote character already inside an item is doubled, which is how SQL escapes it. Check the result before using it in code that expects a different escape.
- Split uses the delimiter as literal text, not a pattern, and works across the whole input, including existing line breaks.
- Skip empty drops items that are blank after trimming. Numbers are not converted, so a quoted ID stays text.
Join & Split Lines FAQ
How do I turn a column of values into a comma-separated list?
Paste the column, keep Join lines selected and choose Comma or Comma and space. The single line is ready to copy.
How do I make a SQL IN list from a list of IDs?
Paste the IDs, then click the SQL IN list preset. It joins the lines with commas, wraps each item in single quotes and adds parentheses, giving ('1001', '1002', '1003').
Can I split a comma-separated list into separate lines?
Yes. Choose Split into lines, pick Comma as the delimiter and turn on Trim items to remove spaces around each value.
What happens to blank lines?
With Skip empty on, blank lines are left out of the joined list and empty pieces are left out when splitting. Turn it off to keep them.
Can I use more than one character as the delimiter?
Yes. Choose Custom and type any text, such as " | " or " -> ". It is used exactly as typed, including spaces.