Join Lines

Combine lines into one, with a comma, space or any separator.

Result

red, green, blue
1 lines · 16 bytes
  • 3 lines joined.

How does joining lines work?

Joining takes a list with one item per line and turns it into one line, with a separator placed between items. The sample red, green and blue becomes "red, green, blue". The separator can be a comma and space, a plain space, a pipe, a tab or anything you type.

You can also wrap every item in double or single quotes first. That turns a column of values into something ready to paste into code, for example "red", "green", "blue" for an array, or 'red', 'green', 'blue' for a SQL IN list. The note under the result counts how many lines were joined.

How to use the Join Lines

  1. Paste your list, one item per line.
  2. Type the separator you want.
  3. Choose whether to wrap items in quotes.
  4. Copy the single line.

Real situations

When people use the Join Lines

  • 1

    Build a SQL IN list

    Turn a column of IDs or names into a quoted, comma-separated list for a query.

  • 2

    Make an array or list for code

    Wrap each item in quotes and join them to paste into an array in JavaScript, Python or JSON.

  • 3

    Turn a spreadsheet column into one line

    Copy a column from a spreadsheet, join with commas and paste it into an email or form field.

  • 4

    Make CSV rows or tags

    Combine values into a single comma-separated row, or a space-separated list of tags.

FAQ

Join Lines: questions answered

How do I make a comma-separated list?

Paste one item per line and keep the separator as a comma followed by a space. Red, green and blue become "red, green, blue". Change the separator to "," with no space if you do not want one.

How do I quote each item?

Choose the wrap option: double quotes give "red", "green", "blue" and single quotes give 'red', 'green', 'blue'. This is handy for SQL strings and for arrays in code.

Are empty lines joined too?

Every line pasted is joined, including blank ones, which would leave an empty item. Remove empty lines first if you do not want that.

Will it escape quotes inside items?

No. It simply puts quote marks around each line. If an item already contains a quote, you need to escape it yourself, and for SQL you should use parameters rather than building queries from text.

Can I split a line into many lines?

Not with this tool. It only joins. To go the other way, use find and replace in an editor, replacing the separator with a new line.

Does it trim the lines first?

No. Spaces at the ends of lines are kept. Use the remove extra spaces tool first if your list has stray spaces.

Is this Join Lines free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way