String Literal Escaping
Converts raw JSON into a properly escaped string with \", \n, \t, and \\ for cURL, code, and env vars.
Escape quotes, newlines, and backslashes for string literals, or decode stringified JSON back into readable JSON.
Escape and unescape JSON strings online. Safely format JSON for string literals, cURL commands, environment variables, and API payloads.
Escape: {"msg":"Hi"}
Unescape: "{\"msg\":\"Hi\"}"{\"msg\":\"Hi\"}
{"msg":"Hi"}Tip: If a value shows backslashes before every quote, it has been stringified twice; unescape it once to get the real JSON.
Converts raw JSON into a properly escaped string with \", \n, \t, and \\ for cURL, code, and env vars.
Decodes double-escaped strings (like stringified logs or API responses) back into readable JSON.
Automatically beautifies unescaped JSON so you can inspect it immediately.
Switch seamlessly between Escape mode and Unescape mode with one click.
Escape JSON when embedding a payload inside another JSON string, an environment variable, a cURL command line, or a programming language string literal.
Unescape takes a string containing escaped characters like \" and \n and restores them to their raw unescaped values.
Double quotes (\"), backslashes (\\), newlines (\n), carriage returns (\r), and tabs (\t).
Yes! Everything executes in your local browser, so no sensitive payloads are ever sent over the network.