๐Ÿ”’ Runs in your browser โ€” nothing is uploadedโœ“ Free, no signup

JSON Escape & Unescape

Escape any text โ€” including JSON itself โ€” into a valid JSON string, or turn an escaped JSON string back into readable text.

0 characters

JSON string

When should you use the JSON Escape / Unescape?

  • Putting a JSON document inside another JSON field as a string
  • Reading an escaped JSON string from a log or API response
  • Escaping multi-line text, quotes or Windows paths for a JSON payload

How to use the JSON Escape / Unescape

  1. 1

    Choose a direction

    Escape turns text into a JSON string. Unescape turns a JSON string back into text.

  2. 2

    Paste your text

    Paste the text or the escaped string. The result updates as you type.

  3. 3

    Set options

    Choose whether to wrap the result in quotes, and whether to escape non-ASCII characters as \uXXXX.

  4. 4

    Copy the result

    Click Copy and paste it into your code or payload.

Examples

Escaping JSON to embed it in a string

Text

{"name": "Ada", "path": "C:\temp"}

Escaped

"{\"name\": \"Ada\", \"path\": \"C:\\temp\"}"

Common errors and how to fix them

This is not a valid JSON string
When unescaping, every double quote inside the string must be escaped as \" and backslashes as \\. Check for a stray unescaped quote.
The output is double-escaped
The input was already escaped. Use Unescape first, or escape the original text instead.
Related tools:ย String Escape / Unescape ยท JSON Formatter ยท JSON Minifier

More from JSON Tools

Free tools that run in your browser โ€” no signup, nothing uploaded.

JSON Escape / Unescape FAQ

Double quotes become \", backslashes become \\, and control characters become sequences like \n (new line), \t (tab) and \r. Other control characters use \uXXXX.

They're the same idea: JSON.stringify() on a string produces an escaped, quoted JSON string. This tool does that without writing code.

Switch to Unescape and paste the string, with or without its surrounding quotes. Escape sequences like \n and \" are turned back into real characters.

No โ€” JSON supports UTF-8, so รฉ or ๐Ÿ˜€ can appear as is. Tick 'Escape non-ASCII' only if a system requires pure ASCII.

Each quote inside the inner JSON must be escaped so it doesn't end the outer string. That's expected โ€” unescape it to read it.

No. Escaping happens in your browser.