Both directions
Escape JSON to a string, or unescape a string back to JSON.
Escape JSON into a string literal, or unescape a JSON string back into readable JSON.
Escape JSON into a string literal, or unescape a JSON string back into readable JSON.
The live editor, upload controls, and browser-only processing load after the app bootstraps on the client.
JSON to String Converter turns a JSON object or array into an escaped string literal — the same result as JSON.stringify(JSON.stringify(value)) — so it can be embedded in source code, an environment variable, a database column or another JSON payload.
It also works the other way: paste an escaped string such as "{\"id\":1}" from a log, queue message or API response and get clean, formatted JSON back. Payloads that were escaped more than once are unwrapped automatically.
Escape JSON to a string, or unescape a string back to JSON.
Paste either form and the right direction is picked for you.
Unwraps strings that were stringified two or more times.
Conversion runs in your browser; nothing is uploaded.
Escaping JSON by hand is error-prone: one missed backslash and the payload breaks. Unescaping is worse when a value was stringified twice and every quote carries three backslashes.
This converter validates the JSON first, shows exactly where it's invalid, and peels off as many layers of escaping as needed in one step.
Invalid JSON is reported with its line and column before anything is escaped.
Output with double quotes, single quotes for JavaScript, or no surrounding quotes.
Escape compact JSON, or keep indentation as \n sequences.
Move the output back into the input to check the round trip.
Produces an escaped string literal ready to paste into code or config.
Reads "…", '…' or bare escaped text and returns formatted JSON.
Detects and removes multiple levels of escaping automatically.
Points to the line and column of a JSON syntax error.
Minified or pretty, 2 or 4 space indentation, and three quote styles.
Your last input is kept in this browser for next time.
Escaping is exact, including backslashes, newlines and unicode.
Turn unreadable escaped log lines into formatted JSON instantly.
Useful for JavaScript, Python, Go, Java, shell scripts and config files.
Payloads never leave your browser.
Embed JSON in strings, SQL, message queues and environment variables.
Prepare JSON for data attributes, inline scripts and test fixtures.
Read escaped JSON from logs, CloudWatch, Kubernetes events and webhooks.
Build request bodies and compare escaped payloads during testing.
Start with the exact input you plan to use in the real JSON to String Converter workflow instead of a simplified placeholder.
If the result is not what you expect, narrow the input down first and then build back up until the issue becomes clear.
Escape a config object into a single-line string for a .env file or secret.
Turn a stringified payload from logs back into readable JSON.
Produce a string literal for tests, fixtures or inline scripts.
Put one JSON document inside a string field of another, correctly escaped.
It serialises your JSON and escapes it as a string literal — quotes become \" and newlines become \n — exactly like calling JSON.stringify on the JSON text.
Yes. Paste the escaped string and choose String → JSON (or leave Auto on). It accepts double-quoted, single-quoted and unquoted escaped strings.
String → JSON keeps unwrapping until it reaches JSON, up to five layers, and tells you how many it removed.
No. Everything runs in your browser.
If JSON to String Converter solves part of the workflow but you still need a different output or helper, the support links are a good place to suggest the next improvement.