Text, Strings, and JSON
JSON is always text. What differs is how many layers of escaping sit between you and the structure. A payload logged with JSON.stringify() twice arrives with \" in place of every quote; parsing it once yields a string, and parsing that string yields the object.
The Three Shapes You Will Paste
- Minified JSON —
{"a":1,"b":[2,3]}. One parse, then indent. - Escaped JSON string —
"{\"a\":1}". Parsing unwraps the outer string first. - Plain prose — not JSON at all, and reported as a syntax error rather than guessed at.
How to Convert Text to Formatted JSON
- Paste the text into the input pane.
- If it parses, the output pane returns indented JSON with highlighting.
- If it does not parse, the error line tells you which character broke it — usually an unescaped quote.
Doing It in Code
// JavaScript — unwrap a doubly-encoded payload
const once = JSON.parse(raw); // still a string
const data = JSON.parse(once); // now an object
console.log(JSON.stringify(data, null, 2));Who this guide is for
- Read a JSON payload that was written into a single log line
- Expand an escaped JSON string stored in a TEXT or VARCHAR column
- Unpack a stringified body from a webhook delivery record
- Make a one-line JSON blob from a terminal copy-paste readable