Skip to content
Skip to content
Transform

String to JSON Converter

Paste an escaped string and get clean, readable JSON back.

  • Unescapes quotes and newlines automatically
  • Works with or without surrounding outer quotes
  • Load the result straight into the editor

Practical guide

Build, validate, and reuse JSON with less friction.

A focused walkthrough for deciding when the tool fits your workflow.

The String to JSON Converter reverses JSON escaping: paste a string containing backslash-escaped quotes and newlines, and it unescapes and parses the content back into clean, pretty-printed JSON. This is the tool you reach for after copying an escaped JSON payload out of a log line, an API response, or a string field nested inside another JSON document.

How to use the String to JSON Converter

  1. Open the String to JSON panel from the left rail (under Transform).
  2. Paste the escaped string — with or without its surrounding quotes.
  3. The recovered, pretty-printed JSON appears on the right automatically.
  4. Click Use in Editor to load it into a tab for further editing, validation, or conversion.

What it fixes

  • Manually removing backslashes one at a time to read an escaped payload
  • Confusion over whether a string needs one or two rounds of unescaping
  • Copy-pasting an escaped JSON string into a JSON parser and getting a syntax error because it is still escaped
  • Losing time writing a throwaway script just to call JSON.parse() twice

JSON code example

Given this escaped string:

TEXT
"{\"name\":\"Alice\",\"role\":\"admin\"}"

the converter recovers:

JSON
{
  "name": "Alice",
  "role": "admin"
}

When to use it

  • Reading logs. A JSON payload was logged as a string value — paste it here instead of manually unescaping it.
  • Nested JSON fields. An API response contains a JSON document as a string inside another JSON object; extract and read it without leaving your browser.
  • Debugging double-stringified data. Application code called JSON.stringify() an extra time by mistake — recover the original structure to see what actually went wrong.
  • Working backward from JSON to String output. Verify that a string produced by the JSON to String tool round-trips correctly.

Related tools and articles

FAQ

Questions about String to JSON Converter

Everything you need to know before you start.

It takes a string that contains escaped JSON — with backslash-escaped quotes like \" and newlines as \n — and reverses the escaping, then parses the result into a readable, pretty-printed JSON document. It is the equivalent of calling JSON.parse() twice: once to unescape the string, once to parse the JSON inside it.

Common sources are log lines where a JSON payload was logged as a string, API responses that nest a JSON document inside a string field, JSON.stringify() being called twice by mistake in application code, or copying a JSON value out of another JSON document's string field.

No. The converter accepts the string with or without its surrounding double quotes. If you paste it without outer quotes, it is treated as if it had them; if parsing fails, it falls back to treating the input as plain, already-valid JSON.

Use the companion JSON to String tool. Paste JSON there and it produces the escaped, quoted string form of it — useful for embedding JSON in code, config values, or single-line logs.

Ready to use it?

String to JSON Converter, free & private.

No account needed. Your JSON never leaves your browser.

Launch String to JSON Converter