Escape and unescape JSON string content for curl commands, config values, logs, and code snippets locally in your browser.
Output
line one\n\"quoted\" value
Quick answer
JSON string escaping converts plain text into content that can safely live inside a JSON string value. It adds escape sequences for quotes, backslashes, newlines, tabs, and Unicode characters; unescape mode turns those sequences back into readable text.
How to use
1. Choose escape or unescapeUse escape mode before placing text inside a JSON string. Use unescape mode when you copied a JSON-encoded string from logs, curl output, or a config file.
2. Paste the string contentPaste the raw text or escaped string content. You do not need to wrap the input in outer JSON object syntax.
3. Copy the converted textUse the result in request bodies, environment variables, fixtures, config files, or debugging notes.
Examples
Escape quotes and a newline
Input
line one
"quoted" value
Output
line one\n\"quoted\" value
Unescape a logged JSON string
Input
path:\\tmp\\apphelp\tstatus:\"ok\"
Output
path:\tmp\apphelp status:"ok"
Common use cases
Prepare a string value for a JSON API body or curl command
Decode escaped strings copied from application logs
Create test fixtures with newlines, quotes, tabs, or backslashes
Check whether Unicode escape sequences represent the text you expect
Edge cases
Escaping string content is different from formatting a full JSON document
Outer quotes are usually added by the surrounding JSON value, not by this tool
A single backslash must be escaped as two backslashes inside a JSON string
Malformed escape sequences will fail in unescape mode so you can fix the source text