Paste your escaped JSON string below to convert it back to readable JSON:
Mode:Convert escaped JSON string back to JSON
What is JSON Escaping?
When JSON is embedded inside a string (like in a database field or API response), special characters must be escaped with backslashes. This tool converts those escaped strings back to readable, valid JSON.
Example
Escaped JSON string:
"{\\"name\\":\\"John\\",\\"age\\":30}"Unescaped JSON:
{
"name": "John",
"age": 30
}Common Escape Sequences
| Escaped | Unescaped | Description |
|---|---|---|
\\" | " | Double quote |
\\\\ | \\ | Backslash |
\\n | newline | Line feed |
\\r | return | Carriage return |
\\t | tab | Horizontal tab |
\\uXXXX | unicode | Unicode character |
Why Does This Happen?
JSON gets double-escaped in several common scenarios:
- Database storage — JSON stored as a text column needs escaping
- API responses — JSON embedded in another JSON string
- Logging — Log systems often escape JSON for single-line output
- Message queues — Kafka, RabbitMQ often stringify JSON payloads
- Environment variables — Complex config stored as escaped strings
Programmatic Solutions
JavaScript
// Unescape a JSON string
const escaped = '{"name":"John","age":30}';
const unescaped = JSON.parse(escaped);
// If double-escaped (string within string)
const doubleEscaped = '"{\"name\":\"John\"}"';
const parsed = JSON.parse(JSON.parse(doubleEscaped));Python
import json
# Unescape a JSON string
escaped = r'{"name":"John","age":30}'
unescaped = json.loads(escaped)
# If double-escaped
double_escaped = r'"{"name":"John"}"'
parsed = json.loads(json.loads(double_escaped))Command Line (with jq)
# Parse escaped JSON
echo '"{\"name\":\"John\"}"' | jq -r '.' | jq '.'Escape Mode
This tool also works in reverse. Use Escape mode to convert JSON into an escaped string for embedding in:
- JavaScript string literals
- JSON string values
- Database text fields
- Environment variables
Pro Tips
- 💡 Multiple layers — If one unescape doesn't work, the JSON might be double or triple escaped. Run it multiple times.
- 💡 Check the quotes — Properly escaped JSON strings are usually wrapped in outer quotes.
- 💡 Validate after — Use the JSON Validator to ensure the unescaped result is valid JSON.
Related Tools
- JSON Escape — Convert raw text to escaped JSON strings
- JSON Validator — Validate your unescaped JSON
- JSON Stringify — Similar escaping functionality
- JSON Minify — Compact JSON for storage