Arte SheetsLearn. Try. Understand.

Text

Put double quotes inside a formula: "" escaping vs CHAR(34)

Generate quoted CSV fields, JSON payloads, and HTML attributes cleanly using doubled "" quotes or readable CHAR(34).

Why spreadsheets use "" (not \") to escape quote characters

Unlike JavaScript or Python, spreadsheet formulas do NOT use backslashes (\") to escape double quotes. Instead, you write two consecutive double quotes "" inside an outer quoted string—so """" (open quote + "" + close quote) produces a single literal " character.

When building JSON payloads with many quoted keys, concatenating CHAR(34) (ASCII 34 = ") avoids unreadable walls of quadruple quotes.

HTML content also requires context-appropriate escaping. Do not construct SQL statements from user text with concatenation; use parameterized queries. Use a real JSON/CSV exporter for unrestricted data.

GoalSku (A) / Price (B)Output String
Quoted CSV rowPRO-10 / 49"PRO-10",49
JSON objectPRO-10 / 49{"sku":"PRO-10","price":49}
HTML anchorPRO-10 / 49<a href="https://arte-soft.com">PRO-10</a>

Doubled quotes "" vs CHAR(34) JSON builder

The CSV example doubles quote characters inside the SKU field before surrounding it with quotes. CHAR(34) makes the literal quote character easier to read.

=CHAR(34) & SUBSTITUTE(A2,CHAR(34),CHAR(34)&CHAR(34)) & CHAR(34) & "," & B2

Readable JSON builder with LET(q, CHAR(34), ...)

The JSON expression illustrates quoting for the fixed simple sample only. It is not a general serializer: arbitrary input needs escaping for quotes, backslashes and control characters, plus locale-independent number formatting.

=LET(q, CHAR(34), "{" & q & "sku" & q & ":" & q & A2 & q & "," & q & "price" & q & ":" & B2 & "}")

Try the example

Use the original values or change them to test your understanding.

Further reading