Add Quotes to Text Lines
Wrap every line of text in straight double quotes.
Text Tools Runs in your browser
How do you add quotes to each line of text?
Paste three lines reading apple, banana and cherry and you get back "apple", "banana" and "cherry", each still on its own line and ready for code, CSV or a config array. Straight double quotes are used because that is what most parsers expect. Blank lines are skipped, existing quotes inside the text are not escaped, and nothing else about the lines changes.
How to use the Add Quotes to Text
- 1 Enter one value per line.
- 2 Each line comes back wrapped in straight double quotes.
- 3 Blank rows pass through unquoted.
- 4 Copy the quoted list into your code or CSV.
What you can use it for
- Turning a list into quoted code strings.
- Building a quoted column for CSV import.
- Preparing values for a JSON or config array.
- Wrapping names or terms in quotation marks.
Frequently asked questions
Which quote style does it apply?
Straight double quotes ("), the form JSON, CSV parsers and most programming languages expect. Curly quotes are never used.
What if a line already contains a quote character?
It is kept but not escaped. For strings destined for code, run the escape-string tool afterwards to handle inner quotes.
Do empty lines become ""?
No. Blank rows are left blank, so you never end up with a column of empty strings.
Related tools
More Text Tools
More tools like this:
All Text Tools