JSON containing quotation marks
Illustrative exampleEvery double quote becomes an escaped quote, so the text can sit inside a string.
{"name":"Ada","role":"admin"}{\"name\":\"Ada\",\"role\":\"admin\"}Working with JSON inside Java source code, JavaScript strings, SQL queries, or configuration files often requires escaping special characters.
Captain JSON’s JSON Escape / Unescape tool helps you convert JSON into escaped strings and restore escaped JSON into its original readable format.
Escape or unescape JSON instantly with a live output preview and simple conversion workflow.
Part of the Captain JSON toolkit — 20+ JSON tools in one extension.
Example: escaping JSON with quotation marks
Illustrative example{"name":"Ada","role":"admin"}{\"name\":\"Ada\",\"role\":\"admin\"}Your JSON toolkit. Wherever you develop.
Captain JSON brings essential JSON developer utilities into your everyday browser workflow. Escape JSON strings, convert between data formats, inspect JWT tokens, work with JSONL files, validate JSON schemas, and generate code from JSON. Install Captain JSON on your preferred supported browser and access your developer toolkit from one convenient place.
Available today: Google Chrome, Microsoft Edge and Mozilla Firefox. More browsers are coming soon.
JSON escaping replaces characters that would break a string — double quotes, backslashes and control characters such as line breaks — with escape sequences like \", \\ and \n, so JSON can be embedded inside another string. Captain JSON’s JSON Escape / Unescape tool converts JSON into an escaped string and restores escaped JSON to its readable form, with a live output preview.
About Captain JSON: Captain JSON is a browser extension by PiratesOfBugs that provides JSON developer utilities including JSON comparison, formatting, pretty printing and validation.
Convert in either direction and see the result as you work.
Convert JSON into an escaped string that is safe to embed.
Restore an escaped string to its original, readable JSON.
See the converted output as you work.
Convert escaped and unescaped JSON in one step.
Copy the converted result for your code or configuration.
JSON frequently needs to be embedded inside programming languages, SQL queries, source code, and configuration files.
Special characters such as quotation marks, backslashes, and line breaks can create formatting problems when JSON is inserted directly into strings.
Manually escaping these characters is time-consuming and can introduce errors.
Captain JSON simplifies this process by allowing you to escape and unescape JSON with an instant preview.
Embed JSON in Java string literals.
Place JSON inside JavaScript strings.
Prepare JSON text to use as a string value in SQL.
Store JSON inside configuration values.
Embed JSON in source code without breaking the string.
These illustrative examples show escaping and unescaping on typical JSON. They are examples, not screenshots of the extension. Escaped output is shown without surrounding quotes — wrap it in the quotes your language needs.
Every double quote becomes an escaped quote, so the text can sit inside a string.
{"name":"Ada","role":"admin"}{\"name\":\"Ada\",\"role\":\"admin\"}Line breaks become \n sequences, so multi-line JSON fits on one line.
{ "id": 1, "name": "Ada"}{\n \"id\": 1,\n \"name\": \"Ada\"\n}Each backslash is doubled, as well as each quote being escaped.
{"path":"C:\\Users\\Ada"}{\"path\":\"C:\\\\Users\\\\Ada\"}Unescaping turns the escape sequences back into the characters they stand for.
{\"status\":\"ok\",\"count\":2}{"status":"ok","count":2}From escaping JSON strings and converting data formats to inspecting JWT tokens, working with JSONL, validating schemas, and generating code, Captain JSON brings essential developer utilities together in one browser extension.
We use analytics cookies to understand how the site is used. No personal data is sold. See our privacy practices before choosing.