Updated 2026-07-09
Escape text for use inside JSON strings, or unescape a JSON string back to plain text — online and free. Switch direction with one click: Escape turns quotes, backslashes, newlines, and tabs into safe escape sequences, while Unescape reverses them. Everything runs in your browser, so nothing is uploaded.
Hand-writing JSON breaks the moment a value contains a quote or a backslash. This tool takes any text and makes it safe to drop into a JSON string (no surrounding quotes added), and turns escaped strings from logs or configs back into readable text — instantly, with one-click copy.
Unescape decodes the escape sequences in place. Paste a whole double-encoded log line — the kind
where a message field hides an escaped JSON blob — and every \n becomes a real newline and every
\" becomes a quote, so the buried payload becomes readable on its own lines instead of a wall of
escapes. If the decoded text is itself valid JSON, it is pretty-printed for you.
He said "Hi" on line 1.\nDone.
He said \\"Hi\\" on line 1.\\nDone.
C:\\\\temp\\\\file.txt
C:\\temp\\file.txt
{\"a\":1,\"b\":[2,3]}
{
"a": 1,
"b": [
2,
3
]
}
curl -X POST https://snaptools.dev/api/v1/tools/json-escape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"He said \"Hi\" on line 1.\\nDone."}'