Text to Comma Separated List

Paste a column and get a comma separated list in one click, with quotes and a custom separator if you need them.

50 free uses every 24 hoursUnlimited with Pro →

Private by design — your data stays on your deviceEverything runs right here in your browser. What you type is not sent to our server and is not stored.
  • Runs in your browser
  • Not stored
  • No sign-up

This tool turns a column of lines into a comma separated list and back again. Paste values copied from a spreadsheet, choose whether to add quotes, pick a custom separator if commas are not right, and copy the single-line result. It is a quick way to convert column to comma list format for SQL, tags and forms.

How do I make a comma separated list?

  1. Choose the direction: lines to list, or list to lines.
  2. Paste your values, one per line.
  3. Choose whether to add quotes and which separator to use.
  4. Copy the result.
How to use the Text to Comma Separated List on OneHubTools: 4 steps with a real screenshot of the tool
How to use the Text to Comma Separated List, step by step.

Common uses

TaskInputOutput
SQL IN list101, 102, 103 on separate lines'101', '102', '103'
Tags for a blog postOne tag per lineseo, pdf tools, images
Email recipientsOne address per linea@x.com, b@y.com
Spreadsheet importA list from a documentValues ready for one cell
Result from the Text to Comma Separated List on OneHubTools
What the Text to Comma Separated List gives you.

Building an SQL IN list

When you need to filter a database by many IDs, copy the ID column from Excel, paste it here and add quotes. You get a ready SQL IN list such as ('A12', 'B34', 'C56'). Numbers usually do not need quotes, but text values do. Check the result for blank lines or stray spaces before you run the query, and format the full query with the SQL formatter.

When to add quotes

Add single quotes for SQL text values and double quotes for JSON arrays or CSV fields that may contain commas. Leave quotes off for plain number lists and simple tags. If a value already contains a quote, check that it is escaped correctly for the system you are pasting into.

Using a custom separator

Not every system wants commas. Use a custom separator such as a semicolon for European spreadsheets, a pipe for some data formats, or a new line with a dash for bullet lists. Type the separator you need and the list updates instantly.

Turning a list back into lines

Switch the direction to split a comma separated list into one item per line. That is handy when someone sends you a long line of email addresses or keywords and you want to sort or clean them. After splitting, use sort lines to put them in order and remove duplicate lines to drop repeats.

Tidy data first

Spaces at the start or end of a line can cause mismatches in databases. Run your values through remove extra spaces if they came from a messy source. To wrap each line with your own text instead, such as an HTML tag, use add prefix and suffix to lines. For full table conversions, CSV to JSON handles columns and headers.

A worked example

Say a colleague sends you 300 order numbers in a spreadsheet and asks which ones shipped. Copy the column, paste it here, add single quotes and copy the result. Paste it into WHERE order_no IN (...) and run the query. What used to take ten minutes of manual typing now takes under a minute, with no missed or mistyped values.

Who uses it?

Developers build SQL and code arrays. Marketers prepare tag and keyword lists. Office staff combine email addresses for a meeting invite. Teachers turn class lists into one line for a form. The tool works in your browser, so the data you paste stays on your device.

Limits and specs

PriceFree
Free use50 uses every 24 hours — shared with 178 other tools in the “Basic tools” group
Where it runsIn your browser
Sign-upNot needed
Muhammad Shahwaiz Gillani
Maintained and reviewed by Muhammad Shahwaiz GillaniSoftware engineer and founder of OneHubTools · Last reviewed

How we checked it: We tested it in Chrome with sample text and checked the output by hand.

Where the facts come from

According to RFC 4180, CSV files store one record per line with fields separated by commas; the format was documented more than 20 years ago, and Excel can open about 1 million rows of it in one sheet.

Spotted a mistake or the tool did not work for you? Tell us and we will fix it.

Rate this tool

Ratings come only from signed-in users, so every rating is verified.

Only signed-in users can rate tools, so every rating shows a ✔ Verified badge.Sign in to rate

Frequently asked questions

How do I convert a column to a comma separated list?

Paste the column with one value per line and the tool joins them with commas straight away.

Can I add quotes around each value?

Yes. Choose single or double quotes, which is useful for an SQL IN list or JSON.

Can I use a semicolon instead of a comma?

Yes. Type any custom separator, such as a semicolon or a pipe.

Can I split a list back into lines?

Yes. Switch the direction to list to lines.

Is my data uploaded?

No. The conversion happens in your browser.

Does it remove empty lines?

Blank lines are skipped, so you do not get empty values in the list.

Related tools

All text tools →