How each line gets wrapped in quotes
Turning a column of names copied out of a spreadsheet into a code array, or a list of items into values for a database query, normally means adding quotes by hand on every line. This tool wraps each pasted line for you and can add the trailing comma too, so the result pastes straight into your editor.
The part that matters most is what happens when a value already contains the same quote. Wrapping it naively closes the string early and breaks the code. The backslash option puts a backslash before each inner quote and also doubles any literal backslash, which is what JavaScript and JSON expect. The doubling option repeats the quote instead, the convention used by SQL and CSV. Choosing to leave it alone keeps the value untouched and reports, as a warning, how many unescaped quotes remain.
Trailing commas come in three settings. Adding one to every line except the last suits JSON arrays, where a comma after the final item is invalid. Blank lines are skipped by default so gaps in your list do not become empty string entries, and each line is trimmed at both ends. The processing notes report exactly how many lines were skipped and how many quotes were escaped, so nothing happens silently.
Frequently asked questions
Depending on the setting it is escaped with a backslash or doubled. If you choose to leave it alone the value is untouched and the number of unescaped quotes is reported.
Pick double quotes with backslash escaping and set the comma option to every line except the last. All that is left is wrapping the block in square brackets.