← Back to tools
JSON string tool
Top area is raw text; bottom is JSON.stringify output. Decode runs JSON.parse on the bottom box.
Back to homeTop area is raw text; bottom is JSON.stringify output. Decode runs JSON.parse on the bottom box.
Back to homeJSON.stringify is the safest way to escape JavaScript string content.
"Line1\nTab\there \"quote\""
Decode runs JSON.parse on the bottom field; it must be valid JSON.