To add quotes to each line for VS Code, paste your list into a quoting tool that knows each format's escaping rule, click the preset for the JSON array, SQL IN clause or CSV row you need, and copy the result straight into your editor. A plain list of IDs, names, or values sitting one entry per line is not yet code: it is content. VS Code will color it, but it will not parse it, validate it, or run a query against it. The gap between a chat-message list and a JSON array literal that compiles, an SQL IN clause the query console accepts, or a CSV row Excel imports cleanly is exactly the quoting and escaping rules the three formats disagree on. Add Quotes to Each Line is built to bridge that gap in one click, with the rules pinned to the standards each format cites, and it runs entirely in your browser so the list never leaves your machine.

Why VS Code Users Hit the Same Quoting Problem
Most lists that land in a developer's day arrive as plain text: fifty user IDs from a support ticket, a column of country codes copied from a spreadsheet, twenty product SKUs from a colleague's chat message. Inside VS Code they sit in a scratch buffer as raw text, visible and searchable but unusable as code. To turn them into a JSON array literal, the list needs double quotes around every value and a comma after every line except the last; to turn them into a SQL IN clause, single quotes wrap each value and single quotes inside values must be doubled; to turn them into a CSV row, double quotes wrap each value and any double quote inside doubles again.
The temptation is to reach for VS Code's own multi-cursor editing or column selection and type quotes by hand. That works for ten lines, breaks for a hundred, and almost always mishandles the embedded-quote case. A list that contains O'Brien looks harmless until SQL rejects it; a list that contains say "hi" looks harmless until JSON throws a syntax error; a list that contains 6" ruler looks harmless until a CSV importer misreads the row. The mistake is rarely the quotes themselves; the mistake is treating three different escaping rules as one.
What the Tool Does Inside a VS Code Workflow
The Add Quotes to Each Line tool takes a list, one item per line, and turns it into paste-ready code for the format you actually need. Click the JSON preset and every line is wrapped in double quotes with embedded quotes backslash-escaped per RFC 8259; click the SQL preset and every line is wrapped in single quotes with embedded single quotes doubled per the ISO string-literal rule documented in PostgreSQL; click the CSV preset and every line is wrapped in double quotes with embedded double quotes doubled per RFC 4180, with the whole row emitted on a single line. A backtick preset covers JavaScript template literals and escapes both backticks and the interpolation opener so pasted content cannot inject an expression.
Because the tool runs in the browser rather than as a VS Code extension, there is nothing to install and no marketplace risk. Your list, which is often exactly the kind of internal user ID or customer name you would rather not paste into a third-party service, is processed locally and never uploaded. The output is a single text block you copy to the clipboard and paste into the open VS Code editor at the cursor, where the editor's language services take over validation.
How to Wrap a List for VS Code in Three Steps
- Paste your list into the input area, one item per line. Blanks and surrounding whitespace can be left in place; the tool has per-line trimming and a blank-line skip toggle if you want them applied.
- Click the preset that matches the file you are about to paste into: JSON array for a .json file or a JavaScript literal, SQL IN clause for a .sql file or a query console, CSV row for a spreadsheet import or a single-line CSV, or plain quotes when the wrapping is just decoration.
- Fine-tune the quote style, delimiter, or escaping if the defaults are not what you need, then copy the result. Move the cursor into VS Code and paste; the editor will accept the result as valid syntax for the chosen format.
The individual controls cover the cases the presets encode: quote style including none, a delimiter with or without a trailing one on the last line (off by default so a JSON array does not end with a stray comma), escaping on or off, blank-line skipping, and per-line trimming. The result reports how many lines were processed so you can spot a paste that lost its line breaks before pasting into the editor.
The Escaping Rules That Decide Whether It Compiles
JSON, SQL, and CSV do not agree on how to write a quote inside a string. JSON backslash-escapes the double quote, so a line containing say "hi" becomes the string literal "say \"hi\"". SQL, in the ISO rule documented by PostgreSQL and SQLite, doubles the single quote, so a line containing it's becomes 'it''s' rather than 'it\'s'. CSV, in RFC 4180, doubles the double quote and wraps every field in double quotes, so a line containing 6" ruler becomes "6"" ruler".
The three rules differ from one another, and the difference is what the presets encode. A single-quote doubling rule applied to a JSON file produces a string the parser cannot read; a backslash-escape rule applied to a SQL console produces a string PostgreSQL cannot execute. The tool's presets are pinned against the standards each one cites, so the same input produces different, correct escaping under each preset. Running the tool on its own output wraps it again, because the tool cannot know whether the quotes in the input are content or wrapping; if a re-wrap with different settings is needed, start from the original list.
JSON, SQL, and CSV at a Glance
| Format | Wrap character | Embedded quote rule | Join character | Outer wrapper |
|---|---|---|---|---|
| JSON array | " (double quote) | Backslash escape (RFC 8259) | , (comma) | [ ] |
| SQL IN clause | ' (single quote) | Doubled quote (ISO/PostgreSQL) | , (comma) | ( ) |
| CSV row | " (double quote) | Doubled quote (RFC 4180) | , (comma) | none, single line |
| Plain quotes | user-selected | none by default | user-selected | none |
The same input, a list containing Alice, Bob O'Brien, and say "hi", produces different, correct output under each preset. That difference is the reason a single-format prefix-and-suffix tool is the wrong shape for code quoting; the rules are the product.
Pairing With Other List-Prep Tools
Lists rarely arrive ready to quote. A column pasted from a spreadsheet often contains duplicates, trailing spaces, or stray blank rows that would otherwise produce empty strings in the array. Cleaning the list first, then quoting it, is the workflow that avoids both a 200-line IN clause with five duplicates and a JSON array of empty strings. After quoting, paste the result into VS Code and let the editor's built-in language services (JSON validation, SQL syntax highlighting, the diff viewer) confirm the result parses before you commit or run it.
For a different shape of output, the site's Remove Duplicate Lines tool keeps the first occurrence of each line while preserving the retained text exactly, which is the right step to run before quoting when a colleague's paste contains repeats you would rather not propagate into the array.
Limits and Edge Cases Worth Knowing
Input is capped at one million characters and processes in a single linear pass, so even very long lists return instantly. Empty lines are skipped when the toggle is on, which keeps blank rows from becoming empty strings in the array. Quotes that already exist in the input are treated as content rather than wrapping; a list that already starts and ends with quotes will be wrapped again, which is the documented behavior for the same reason a quoting tool cannot tell what is data and what is decoration. If the input is the output of a previous run and the goal is different wrapping, start from the original list rather than re-running.
The tool produces string literals rather than SQL keywords, schema names, or table identifiers, which is the values that go inside the parentheses of WHERE id IN (...).