1. Home
  2. Writing & text tools
  3. Column to Comma-Separated List

Column to Comma-Separated List

Copy IDs from a spreadsheet column and get them back as 1001, 1002, 1003, or as ('1001', '1002') for a SQL query. It works the other way round too.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Column to Comma-Separated List

  1. Paste a column, one item per line.
  2. Pick a preset or set separator and quotes.
  3. Copy the list.

Features

  • Any separator: comma, semicolon, pipe, tab
  • Single, double or backtick quotes; SQL-style escaping of quotes
  • Wrap the list in brackets for SQL IN or JSON
  • Several items per line for long lists
  • Reverse mode splits a list back into a column, respecting quoted items

Supported formats

You can open

  • Typed or pasted text
  • TXT

You get

  • Copied text
  • TXT

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the Column to Comma-Separated List is safe for contracts, IDs, photos and work documents. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Very large files are limited by your device’s memory; on a phone, split huge files into smaller parts first.

Guide

Turning a column into a comma-separated list, and back

Spreadsheets keep values in columns; many other places want them in a single line. A form field expects tags separated by commas, a SQL query needs WHERE id IN ('1001', '1002'), a script wants a JSON array. Copy the column, paste it here and the list is ready. It works in the other direction too.

Separators and quotes

Any separator works: a comma and a space, a bare comma, a semicolon, a pipe or a tab (type \t). Values can be wrapped in single quotes, double quotes or backticks, and the whole list can be wrapped in text of your choice, such as brackets. Long lists can be broken over several lines with a fixed number of items per line, which keeps queries readable.

SQL IN lists

The SQL IN preset writes each value in single quotes, separated by commas, inside brackets. Values that contain a single quote, such as O’Brien typed with a straight apostrophe, would break the query, so the quote is doubled the way SQL expects: ‘O’‘Brien’. Numbers can be left unquoted by choosing “No quotes” while keeping the brackets.

JSON arrays

The JSON preset writes a valid JSON array of strings. Each value is encoded as a proper JSON string, so double quotes, backslashes and control characters inside values are escaped and the result parses without errors.

Cleaning on the way

Trimming removes stray spaces copied from cells, skipping empty items ignores blank rows, and removing duplicates keeps each value once in its original order. The item counter shows how many values ended up in the list.

Back to a column

Press the swap button to go the other way: paste “red, green, blue” and get one item per line, ready to paste into a spreadsheet column. Quoted items that contain the separator stay together, so “blue, light” remains one item, surrounding brackets are removed and doubled quotes inside items are turned back into single ones. The separator can be detected or chosen.

Privacy

The conversion runs in your browser. IDs, customer numbers and other values you paste are never uploaded.

Quoting rules in short

Numbers in SQL can go without quotes, text must be quoted, and a quote inside a value is written twice. CSV and spreadsheet imports usually accept double quotes, with the same doubling rule. JSON always uses double quotes and escapes inner quotes with a backslash, which is why the JSON preset encodes each value separately rather than just wrapping it. Backticks quote column and table names in MySQL, not values. Choosing the preset that matches the destination avoids the classic error where one name with an apostrophe breaks an entire query.

A worked example

Paste the column 1001, 1002, 1003, O’Brien, 1002 with the SQL IN preset and “Remove duplicates” on. The result is (‘1001’, ‘1002’, ‘1003’, ‘O’‘Brien’): four items, the repeated 1002 dropped, and the apostrophe doubled so the query runs.

Add other text around each line with Add Prefix and Suffix, split lines into several columns with Split Text, remove repeated values first with Remove Duplicate Lines, or turn a whole table into JSON with CSV to JSON.

Checked against the current version of the Column to Comma-Separated List on .

Troubleshooting

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

Is there a limit on how many items I can convert?

No fixed limit. Tens of thousands of IDs convert instantly; databases do limit the length of a single IN list, so for very long lists split them with “Items per line” or load the values into a temporary table.

How do I paste the result back into Excel as a column?

Use the swap button to switch to List → column, paste the list and copy the result. Pasted into a cell, each item lands in its own row.

What does “Detect” use to split a list?

It looks at the list: tabs win if present, then semicolons or pipes when there are no commas, otherwise commas. Choose the separator yourself when the list mixes them.

How do I make a SQL IN list from Excel?

Copy the column, paste it here and choose the SQL IN preset. Each value is wrapped in single quotes, quotes inside values are doubled (O'Brien becomes 'O''Brien'), and the list is wrapped in brackets.

Is the JSON array valid JSON?

Yes. With the JSON preset each item is written as a proper JSON string, so quotes, backslashes and special characters inside values are escaped.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.