Escape JSON String
Escape quotes, backslashes, and control characters so text can be embedded as a JSON string value.
Converts raw text — including line breaks, quotes, and backslashes — into a properly escaped JSON string literal, ready to paste as a value inside a .json file or API payload without breaking the surrounding JSON syntax.
Example: A two-line note containing a quoted word becomes a single escaped string with \n for the line break and \" for the quotes — valid to drop directly into JSON.
How it works
- Paste raw text, including quotes or line breaks
- It's escaped into a valid JSON string literal instantly, on your device
- Copy the quoted, escaped result straight into your JSON
Frequently asked questions
Does the escaped output include the surrounding quotes?
Yes — the result is a complete JSON string literal, quotes included, ready to paste directly as a value in a .json file or payload.
Is my data uploaded anywhere?
No — Escape JSON String runs entirely in your browser using JavaScript/WebAssembly. Your data is never sent to a server.
Does this escape forward slashes (/) too?
No — forward slashes are valid unescaped inside a JSON string and don't need a backslash, even though some JSON encoders optionally escape them as \/. This tool only escapes what's actually required by the JSON spec.