JSON String Escape / Unescape — JSON strings must escape a small set of characters: the double quote, the backslash, and the control characters (U+0000 to U+001F). Everything else may appear literally.
Pure function, no upload, no server. Works fully offline.
Was JSON String Escape / Unescape useful?
What is JSON String Escape / Unescape?
JSON strings must escape a small set of characters: the double quote, the backslash, and the control characters (U+0000 to U+001F). Everything else may appear literally.
This tool implements the standard JSON escaping rules from RFC 8259. The "escape" direction converts a raw string into a JSON-safe form (the content you would put between double quotes). The "unescape" direction parses a JSON string literal back to its raw bytes.
How to use it
-
Pick the direction
Escape raw → JSON or Unescape JSON → raw. Both directions round-trip cleanly for any valid input.
-
Paste the input
For escape, paste any string (control characters allowed). For unescape, paste the JSON-quoted content (without the surrounding quotes).
-
Copy the output
Use the escaped form inside a JSON config or template. Use the raw form to inspect what a stored string actually contains.
Examples
Escape multiline Windows log text for JSON
Convert raw double quotes, line breaks, and backslashes into a valid JSON string literal.
Line 1: "Hello" Path: C:\Users\demo
Result: "Line 1: \"Hello\"\nPath: C:\\Users\\demo"
Unescape a serialized payload log entry
Turn a double-escaped JSON string from server logs back into readable plain text.
"First line\n\t\"quoted\" value"
Result: First line followed by an indented line with literal double quotes around "quoted"
Frequently asked questions
Related guides
Related tools
JSON Formatter
Format, beautify, and validate JSON with adjustable indentation — instantly in your browser.
JSON Validator
Check whether your JSON is valid and find the exact line and column of any syntax error.
URL Encoder
Percent-encode text for safe use in URLs — as a query value or a full URL.
Base64 Encoder
Encode any text — including emoji and non-Latin scripts — into standard Base64.