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

EscapedUnescapedDescription
\\""Double quote
\\\\\\Backslash
\\nnewlineLine feed
\\rreturnCarriage return
\\ttabHorizontal tab
\\uXXXXunicodeUnicode 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