How to Unescape JSON String Literals
JSON Unescaping
When to Unescape JSON Strings
Unescape when reading escaped string values from logs, config files, or API payloads that contain \n, \t, or \" sequences.
Real-World Examples
"line1\nline2" → multiline plain text
Decoded error messages from escaped API responses
Environment variable values stored as JSON string literals
Common Mistakes
- Pasting full JSON objects when only a string literal is expected
- Mixing HTML entity escaping with JSON escaping
- Missing surrounding quotes on string literals that require them
Developer Tips
- JavaScript:
JSON.parse('"escaped\nstring"') - If input includes outer quotes, paste the full JSON string literal
Frequently asked questions
Should I include the outer quotes?
You can paste either a full JSON string literal with quotes or escaped content without them.
Will this parse full JSON documents?
It expects string content. Use the JSON Formatter or Validator for full objects and arrays.
What about unicode escapes like \u0041?
Standard JSON unicode escape sequences are decoded as part of JSON string parsing.