JSON Escape Online

Escape JSON strings when you need to paste text into a JSON value, test fixture, API request, or config file.

When You Need JSON Escaping

Use JSON escaping when raw text contains quotes, backslashes, tabs, or newlines and must become a valid JSON string value. This comes up in API testing, logs, localization files, and generated fixtures.

Common Escapes

Key / CodeDescription
"\" for a quote inside a JSON string
\\\ for a literal backslash
newline\n when a line break must stay inside one string
tab\t when preserving tab spacing

Example

Raw text:
He said "ship it" on line 1.

JSON string:
"He said \"ship it\" on line 1."

Common Mistake

Do not escape the whole JSON document when only one field value needs escaping. Escape the string value, then validate the full object with a JSON formatter.

Related

Knowledge is power.