Cómo usar: JSON Escape & Unescape
- Choose a mode: escape or unescape text, or convert between a JSON document and an escaped string.
- Paste the input; the output updates instantly.
- Use Reverse to run the opposite conversion on the result.
Which characters must be escaped in JSON?
| Character | Escape |
|---|---|
Double quote " | \" |
Backslash \ | \\ |
| Newline, carriage return, tab | \n, \r, \t |
| Backspace, form feed | \b, \f |
| Other control characters (U+0000–U+001F) | \u0000–\u001f |
Everything else, including emoji and accented letters, is allowed as-is in UTF-8 JSON. Tick ASCII only to write non-ASCII characters as \uXXXX for systems that cannot handle UTF-8. The forward slash may optionally be escaped as \/, which some servers do to keep </script> out of inline JSON.
JSON inside JSON
Some APIs and message queues carry a JSON document as a string field — for example an SQS message body or a webhook payload. JSON → string produces that double-encoded form; String → JSON removes one layer of escaping and pretty-prints the inner document, which is the quickest fix for the dreaded "{\"id\":1}" in logs.
In code
JSON.stringify(text) // escape (JavaScript)
JSON.parse(escaped) // unescape
json.dumps(text) # Python
json.loads(escaped)
Need URL or HTML escaping instead? Use the URL encoder or HTML entity encoder.
También se busca como: json escape, json unescape, escape json string, json stringify online, unescape json, json string encoder, remove backslashes json.
Herramientas que combinan con: JSON Escape & Unescape
- Formateador JSON — Pega el código JSON para formatearlo, minimizarlo o validarlo.
- Codificación y descodificación Base64 — Convierte texto a Base64 y viceversa con compatibilidad total con UTF-8 (acentos, emojis), cambia a Base64 compatible con URL o arrastra un archivo para obtener su cadena Base64 o su URI de datos.
- JSON Diff — Find exactly what changed between two JSON documents — API responses, config versions, fixtures or exports — as a list of paths with old and new values.
- JSON Schema Validator — Paste a schema and some JSON to see exactly which values break which rule — or generate a starting schema from example data.
Preguntas frecuentes
How do I remove backslashes from a JSON string?
\" and \n are turned back into the real characters.