String Escape / Unescape Online
Escape text as a JSON string literal or decode JSON string escapes back to text.
Open String Escape / UnescapeFree · No sign-up · Browser-based processing
What String Escape / Unescape does
Encode text as a complete JSON string literal with quotes, escaped backslashes, control characters and newlines. Unescape mode accepts either a quoted JSON string or its escaped body. This tool uses JSON rules; JavaScript expressions, Python literals and HTML entities are separate formats.
Common uses
- Prepare text for JSON payloads
- Inspect escaped log messages
How to use String Escape / Unescape
- Enter plain text and choose escape to create a JSON string literal.
- Choose unescape and paste a JSON string literal to recover its original text.
- Copy the result into a JSON value or your text workflow.
Privacy: Runs locally in your browser. Input is not uploaded to the DevNet Kit server.
String Escape / Unescape example
Try the tool with this representative input:
Hello "developer"
C:\projects\demoOptions
escapeExpected result
"Hello \"developer\"\nC:\\projects\\demo"String Escape / Unescape FAQ
Does it support Unicode escapes?
Yes. Unescape mode handles JSON \uXXXX escapes, including surrogate pairs.
Will it run pasted code?
No. It only parses JSON string syntax and never evaluates JavaScript.
Escape a quoted text value for use inside a JSON payload
Choose escape and enter the original text, including any actual newlines or backslashes. The result is a complete JSON string literal with its surrounding double quotes. Use that literal as a JSON value rather than adding another pair of quotes.
Choose unescape to recover the text from a JSON string literal or an escaped string body. This operation follows JSON rules; it does not parse Python literals, decode HTML entities or evaluate JavaScript expressions.
Worked example
Input and settings:
Hello "Ada"
C:\demoOptions:
escapeExpected result or interpretation:
"Hello \"Ada\"\nC:\\demo"Questions about this workflow
Should I add quotes around the escaped JSON result?
No. Escape mode already returns a complete double-quoted JSON string literal. Adding another pair of unescaped quotes would make an invalid JSON value.
Why is a Windows path written with doubled backslashes in JSON?
A backslash introduces an escape in JSON strings. The literal \\ represents one backslash in the decoded value; escape mode writes the required syntax for you.