In Notepad++, adding quotes to each line with Find and Replace wraps every line as `"$1"`, but the same regex silently breaks the moment a line contains a quote, a backslash, or a value the target format treats specially. A pasted list of fifty IDs from a chat window becomes a JSON array only after every embedded double quote is backslash-escaped, a SQL IN clause only after every embedded single quote is doubled, and a CSV row only after every embedded double quote is doubled again. These three rules are different, the differences are documented in the standards each format cites, and a single regex pass cannot satisfy all three at once. The Add Quotes to Each Line tool applies the correct rule per format with one click, runs entirely in the browser, and processes up to one million characters in a single pass.

Why Notepad++ Find and Replace Stops Working on Real Lists
The classic trick is to switch the search mode to Regular expression and replace `^` with `"` and `$` with `"`, or to use a single pattern such as `^(.*)$` with the replacement `"$1"`. That works on a clean list of plain words with no embedded quotes, no commas that mean something inside the value, and no trailing whitespace to clean up. The moment your list contains a value like `say "hi"`, a value that is just the name `O'Reilly`, or a CSV field with a comma inside it, the wrapped output is no longer valid JSON, valid SQL, or valid CSV — it just looks like it is.
Notepad++'s regex engine has no notion of "this is going into a JSON string" or "this is going into a SQL literal." It treats the input as text and the output as text. That is the correct behavior for a text editor, and it is also why the wrapping cannot be left to regex when the destination has its own escaping rules. The fix is to apply those rules after the wrapping, which is what a dedicated quoting tool does per preset.
If your list is already clean — no quotes, no commas that matter, no leading or trailing whitespace — the Notepad++ regex still works and the tool is overkill. For everything else, the difference between the two is the difference between output that compiles and output that produces a `SyntaxError`, a SQL syntax error, or a CSV column that shifts to the wrong cell when imported.
The Escaping Rules Each Format Quietly Requires
Each of the three common destinations handles an embedded quote character differently, and the rule is pinned by a published standard rather than by convention:
| Format | Wrapping character | Embedded quote becomes | Source |
|---|---|---|---|
| JSON array | " | \" (backslash + double quote) | RFC 8259 |
| SQL IN clause | ' | '' (doubled single quote) | PostgreSQL, SQLite, ISO SQL |
| CSV row | " | "" (doubled double quote) | RFC 4180 |
A line that reads `she said "hi"` therefore becomes `"she said \"hi\""` in JSON, `'she said "hi"'` in SQL (the embedded double quote needs no escape because single quotes wrap it), and `"she said ""hi"""` in CSV. The same input, three different correct outputs. Per RFC 4180, every field containing the delimiter, a double quote, or a line break must be wrapped in double quotes, and an embedded double quote is escaped by preceding it with another double quote. Per the PostgreSQL lexical structure documentation, a string constant is bounded by single quotes and any single quote inside the literal is written twice — not preceded by a backslash, which is reserved for a separate escape.
How to Add Quotes to Each Line in Notepad++
The flow keeps you in Notepad++ for the editing and moves only the quoting step to a tool that knows each format's escaping rules. No upload happens at any point.
- In Notepad++, select the lines you want to wrap, or simply leave the cursor anywhere if the whole file is the list. Press Ctrl+A to select everything, then Ctrl+C to copy.
- Open Add Quotes to Each Line in a new browser tab. Paste the list into the input field with Ctrl+V; each item should sit on its own line.
- Pick the preset that matches where the output is going: JSON array for a `[ ... ]` literal, SQL IN clause for a `( ... )` list inside WHERE ... IN, CSV row for a single-row import, or Plain quotes when you only need wrapping with no surrounding syntax.
- If the default settings do not match your case, adjust the quote character, the delimiter (comma by default), whether to add a trailing delimiter after the last line, whether to escape embedded quotes, and whether to skip blank lines or trim each line first.
- Click Copy on the result panel. The result reports how many lines were processed so you can sanity-check the count against your original list.
- Return to Notepad++, place the cursor where the quoted block should go, and paste with Ctrl+V. If the result is for a different destination, switch tabs and paste there instead.
The whole quoting step takes a few seconds; the value is that the output is paste-ready rather than something you have to hand-fix because of an escaping error.
What the Presets Do That Hand-Rolled Regex Cannot
Beyond the per-format escaping, the presets add the surrounding punctuation the destination expects. The JSON preset wraps the list in square brackets and joins items with commas, leaving the last item without a trailing comma so the array is syntactically valid. The SQL preset wraps the list in parentheses and joins with commas, again with no trailing comma. The CSV preset emits a single row of comma-separated, double-quoted fields with no surrounding brackets. A plain-quotes preset exists for cases where you only need the wrapping.
Three behaviours matter in practice:
- Trailing delimiter stays off by default. A trailing comma after the last item is a syntax error in JSON and in most SQL dialects, so the default is to leave the last line clean. A toggle adds one when the destination expects it.
- Blank lines can be skipped, and each line can be trimmed. A list copied from a chat window often has trailing whitespace or empty separator lines; both are toggleable so the output stays tidy.
- The escape step is also a toggle. If you want literal wrapping with no character interpretation — for example, when generating test data that should still contain the raw quote — turning escaping off gives you that.
One behavior is documented rather than hidden: running the tool on its own output wraps it again, because a quoting tool cannot know whether existing quotes are content or wrapping. If you need a different setting, start from the original list rather than re-running on the previous result.
Settings Worth Knowing Before You Copy
The presets are a starting point, and the same tool exposes the individual controls when you need them. Quote style covers single, double, backtick (for JavaScript template literals), or none; delimiter is configurable, with or without a trailing delimiter on the last line; escaping is on or off per format; blank-line skipping and per-line trimming are independent toggles.
The backtick style is the one worth pointing out: it is intended for JavaScript template literals, and the implementation escapes backticks and the interpolation opener so pasted content cannot inject an expression into the surrounding template. The other styles do not need that step.
Everything runs locally in the browser. The input is capped at one million characters and is processed in a single linear pass, so even very long lists return quickly. Your data, which is often exactly the kind of ID list or name list you would rather not paste into a random website, is never uploaded, stored, or attached to an account. That makes the tool a natural fit for the lists that need quoting the most — production IDs, customer names, allowlists, and feature flags — where pasting into a third-party API would be the wrong call.
If you also need to clean the list before quoting (removing duplicates, dropping empty lines, or sorting into a known order), the workflow is the same: clean the list first with the related tools, then come back here for the quoting step. The quoting tool assumes the input is the list you want wrapped and does not silently de-duplicate or sort.