Developer tool
JSON Escape / Unescape
Escape text for use in a JSON string, or unescape escaped JSON back into readable text. Both operations run in your browser — nothing is uploaded.
Escape text for JSON strings
JSON strings need quotes, line breaks, backslashes, and control characters escaped before they can be pasted safely into a JSON value. Paste regular text, escape it, and copy the result.
The unescape action accepts escaped content such as Line one\nLine two or a full quoted JSON string literal.
A common case is a JSON field that holds a stringified JSON object — the inner JSON content is escaped so it can be stored as a string value, and unescaping it reveals the readable structure inside.
Practical examples
- Escape a multiline message before adding it to a JSON request body.
- Unescape a logged JSON string so quotes and line breaks are readable.
- Escape a regex pattern or SQL snippet before embedding it as a JSON config value.
- Unescape a stringified JSON payload from an API error log to read the inner object.
- Check whether copied escaped text is a valid JSON string value.
Related JSON tools
After escaping a string, paste it into the JSON Validator with the rest of your payload. Use the JSON Formatter for readable objects, or the JSON Repair Tool when copied JSON has common syntax issues.
FAQ
Does the escaped result include outer quotes?
No. The output is the escaped string content, ready to paste between JSON string quotes.
Can I unescape a quoted JSON string?
Yes. The unescape action accepts either escaped content or a full quoted JSON string literal.
Is the text uploaded?
No. Escaping and unescaping run locally in your browser.
What characters are escaped?
Quotes ("), backslashes (\), line breaks (\n), carriage returns (\r), tabs (\t), and Unicode code points (\uXXXX) are escaped following the JSON specification.
What does “unescape JSON” mean?
An escaped JSON string uses backslash sequences to represent special characters — \" for a double quote, \n for a line break, and \\ for a backslash. Unescaping reverses those sequences back into readable text. This is common when reading escaped values stored inside API payloads or log output.
Can I use this for a JSON string that contains another JSON object?
Yes. When a JSON field stores another JSON object as a string value, the inner content is escaped so it can be represented safely inside the outer JSON structure. Paste that value here to unescape it, then use the JSON Formatter to inspect the inner object.
Why does unescape show an error?
The input must be valid escaped JSON string content. A stray backslash or unfinished escape sequence cannot be decoded safely.