Data
JSON String Escaper
Encode text as a JSON string literal or decode one JSON string into readable text.
Loading tool…
How to use JSON String Escaper
Prepare a string value for a JSON document without hand-editing quotes and line breaks. Decode mode accepts exactly one JSON string literal and never interprets code or HTML.
- Choose encode or decode and enter the matching string representation.
- Select Run tool to escape or unescape a single JSON string.
- Review the result, then copy it or download the generated file.
Good to know
- Up to 100,000 input characters. Encode mode accepts empty text.
- Decode mode rejects arrays, objects, comments, and unquoted strings. It decodes one layer only.
Common questions
Does this make text safe for every HTML context?
No. JSON escaping is for JSON strings; HTML, attributes, and scripts have separate encoding rules.
Keep going with related tools
All data →Developer
JSON Validator
Check JSON syntax locally and see its root type, value count, and nesting depth.
DeveloperHTML Entity Converter
Escape HTML text delimiters and Unicode numerically, or decode basic and numeric character references.
DeveloperShell Argument Literal Builder
Serialize an authored executable and string argument list into literal POSIX sh or PowerShell command source without running it.