Skip to content

Intermediate · Escaping and Special Characters

All tutorials

Escaping and Special Characters

Inside JSON strings, certain characters must be escaped with a backslash: \" (quote), \\ (backslash), \b (backspace), \f (form feed), \n (newline), \r (carriage return), \t (tab). Unicode can be written as \uXXXX.

"Quote: \"Hello\""
"Tab: col1\tcol2"
"Newline: line1\nline2"
"Unicode: \u00A9 (copyright)"