Add Quotes to Each Line

Wrap each line of text in quotes and optionally add commas — perfect for formatting lists for SQL queries, JSON arrays, CSV files, and code.

Input — one item per line 0 lines · 0 chars
Preview
"apple", "banana", "orange"
Output 0 lines · 0 chars

Why Add Quotes to a List?

When working with SQL, you often need values wrapped in quotes for IN clauses like WHERE name IN ('apple', 'banana', 'orange'). Similarly, JSON arrays require quoted strings, and many programming languages need properly quoted list literals. Doing this by hand for dozens or hundreds of items is tedious and error-prone.

Format a List for SQL IN Clause

Paste your values (one per line), select single quotes, enable "Add comma after each line," and click "Add Quotes." You'll get a perfectly formatted list ready to paste into your SQL query. Use the "No trailing comma" option to avoid syntax errors on the last item.

Supported Formats

This tool supports double quotes, single quotes, backticks, and fully custom prefix/suffix wrapping. You can add commas between items, trim whitespace, and skip empty lines automatically. It handles everything from SQL formatting to JSON array preparation to CSV value quoting.

Frequently Asked Questions

How do I format a list for a SQL IN clause?
Paste your values (one per line), select "Single quotes," check "Add comma after each line" and "No trailing comma," then click "Add Quotes." Copy the result directly into your SQL query.
Can I use custom wrappers like brackets or parentheses?
Yes. Select "Custom…" from the quote style dropdown, then enter any prefix and suffix you want. For example, prefix [ and suffix ] to wrap each line in brackets.
What does "No trailing comma" do?
When enabled, the last line in the output won't have a comma after it. This is important for SQL and JSON where a trailing comma causes syntax errors.
Is my data processed securely?
Yes. All text processing happens entirely in your browser. Nothing is sent to any server.