How to Add Quotes Around Each Line in a List

Wrapping every line of a list in quotes by hand means clicking to the start of each line, typing a quote, clicking to the end, typing another - for a hundred-line list that's two hundred manual edits. It's a one-step operation instead.

Quick answer

Paste your list into Text Fixer and set Output Format to Single Quoted, Double Quoted, or Backtick Quoted. Every non-blank line gets wrapped in that quote character, one item per line, with any quote characters already inside a line automatically escaped so the output stays valid.

Quote-wrap your list now. Free, nothing to install.

Open Text Fixer →

How to quote-wrap a list in 2 steps

  1. Paste your list into Text Fixer, one item per line.
  2. Open Output Format and choose Single Quoted ('), Double Quoted ("), or Backtick Quoted (`) - the output updates instantly with every line wrapped.

What this looks like

A plain list like this:

apple
banana
O'Brien

wrapped as Double Quoted becomes:

"apple"
"banana"
"O'Brien"

A line which already contains the same quote character used to wrap it (like O'Brien above under Single Quoted) gets that internal quote automatically escaped with a backslash, so the output stays valid to paste into code or a query rather than breaking on the embedded character.

One quoted value per line, not a comma-separated clause

This produces one quoted item per line, which is what you want for pasting into a script that reads line by line, or building a code array manually. If what you actually need is a single comma-separated line, like a ready-to-paste SQL IN (...) clause, that's a different output - see the guide to converting a list into a SQL IN clause for that specific format, built with the List to Format Converter tool instead.

Need to add different text, not quotes?

Text Fixer can prepend or append any custom text to every line, not just quote characters.

Read the guide →

Frequently Asked Questions

How do I wrap every line of a list in quotes?
Paste your list into Text Fixer and set Output Format to Single Quoted, Double Quoted, or Backtick Quoted. Every line is wrapped instantly.
What's the difference between single, double, and backtick quoting?
They only change which character wraps each line - single quote ('), double quote ("), or backtick (`). Pick whichever your destination expects: many SQL dialects and Python use single quotes for strings, JSON and many other languages use double quotes, and backticks are used for template literals in JavaScript.
What happens if a line already contains a quote character?
It's automatically escaped with a backslash so the output stays valid. For example, wrapping O'Brien in single quotes produces 'O\'Brien' rather than breaking on the embedded apostrophe.
Does this produce a comma-separated list like a SQL IN clause?
No, it produces one quoted value per line. For a comma-separated, ready-to-paste SQL IN clause, use the list to SQL IN clause guide instead, which is built for that exact format.
Can I remove quotes instead of adding them?
Yes, that's the reverse operation. See the guide to removing quotes from a CSV for stripping existing quote characters back out.
Does quote-wrapping skip blank lines?
Yes. A blank line stays blank in the output rather than becoming an empty pair of quotes ('').
Can I quote-wrap a list and sort or deduplicate it at the same time?
Yes. Output Format, Sort, and Remove Duplicates are independent options in Text Fixer and all apply together in a single pass - no need to run the tool more than once.
Is there a way to add quotes only around some lines, not all of them?
Output Format applies to every non-blank line uniformly. To selectively quote only lines matching a pattern, use Find & Replace with a regex that matches your target lines instead.

Share this tool

Featured on ToolDirs
© 2026 ListDiff

Free online list and text processing tools.