Newlines to a comma list
Paste one item per line. Get a single line joined with commas (or semicolons). Optional quotes around each item.
How to use the Newlines to a comma list
What does the Newlines to a comma list do?
Turn a column of lines into a comma-separated list; It applies this page-specific rule: spreadsheets and emails often give you a vertical list when you needed “a, b, c” for a config file, SQL IN clause, or form field.
Which inputs does this tool use?
To turn a column of lines into a comma-separated list, enter Lines, Separator, Joined; keep every value in the same example; where available, choose between ,, ; to match the required format; the page then updates the result from the current values; Start with a familiar case covered by this rule - Quotes wrap each item and double any quote inside the item - so the expected result can confirm the settings.
How should the tool result be read?
For a result intended to turn a column of lines into a comma-separated list, quotes wrap each item and double any quote inside the item; read joined together with the original lines rather than as an isolated answer, and confirm that its units or structure match the intended use.
Can I use semicolons?
When the goal is to turn a column of lines into a comma-separated list, yes - pick the separator.
Empty lines?
When using the page to turn a column of lines into a comma-separated list, dropped.
Limits and accuracy
When using this tool to turn a column of lines into a comma-separated list, reverse (commas to lines) is the same idea with the split box; check the result in its intended destination before relying on it for important work; keep lines until the output has been checked in its intended destination. For a repeatable check when you need to turn a column of lines into a comma-separated list, record Lines alongside the final output and selected options.
How this works
Spreadsheets and emails often give you a vertical list when you needed “a, b, c” for a config file, SQL IN clause, or form field. This joins non-empty trimmed lines.
Quotes wrap each item and double any quote inside the item. That is enough for a careful CSV cell, not a full RFC 4180 implementation.
Reverse (commas to lines) is the same idea with the split box.
Frequently asked questions
Can I use semicolons?
Yes - pick the separator.
Empty lines?
Dropped.
Tabs?
Not treated as separators on this page.