Recover a document from one quoted JSON string
Identify the two required levels
This page unwraps a JSON string whose contents form a complete JSON document. The input must include the outer string's quotes and valid escapes. Choose Unwrap JSON string to parse that outer value, confirm it is a string, parse the recovered text as JSON and format the resulting value. The output is the inner document representation, not a general evaluation of JavaScript or an arbitrary backslash-removal operation.
An ordinary object is the wrong outer type for this page, even if it is valid JSON. It already represents structured data rather than a string containing document text. Likewise, a quoted greeting can be a valid outer JSON string while its contents are not an inner JSON document. Successful unwrapping needs both stages to pass. These cases are useful for understanding why a generic valid-JSON status is not enough here.
The indentation selector controls the formatted inner result, with the available two-, three- or four-space choices. It does not change the representation layer expected at input. If you need only to format an existing unquoted document, use the existing JSON Formatter rather than adding an unnecessary string layer. Choosing the right tool avoids manufacturing escapes simply to make an unrelated input fit the page.
Keep the original text when investigating an export. An escaped display, a copied string literal and the actual file contents can be different views of related data. Determine what was copied before editing it. The parser does not infer the right number of unwraps from how complicated the text looks, and it does not automatically repeat the operation until an object appears.
Walk through a quoted record
Checked synthetic input
"{\"qty\":3,\"ready\":false}"Exact observed output
{
"qty": 3,
"ready": false
}Use a synthetic outer string containing an object document with quantity three and a ready flag of false. The inner object quotes must be escaped in the outer representation. Run the operation with two-space indentation. The result is a readable object with the numeric quantity and boolean flag, rather than a quoted string containing those characters. The educational figure shows the outer string, recovered text and formatted document as separate stages.
The first parse produces text. It does not yet prove that the text is a valid document. The second parse checks that recovered text with the same strict rules used by the other JSON operations. This matters because a valid outer string can contain an invalid inner document, such as one with a trailing comma or duplicate key. The outer layer does not exempt its contents from validation.
Try a contrasting source that is simply an object. The tool rejects it because the first decoded value is not a string. Then try a quoted greeting. Its outer syntax is valid, but the recovered greeting is not a JSON value in the required document syntax. These are different failure stages. Preserve the original input and error so the distinction is not lost during a sequence of attempted corrections.
Changing indentation alters the readable output layout, not the recovered values. The result is serialized again, so its whitespace, escape spellings or numeric notation need not match the exact inner text originally stored in the outer string. If a workflow requires byte-for-byte recovery of that inner text, this formatting operation is not a guarantee of it. Compare decoded values separately from textual identity.
Apply the actual parser boundaries
Both the outer value and the inner document use strict JSON parsing. Duplicate decoded object names are rejected rather than silently resolved to a first or last value. Comments, unquoted keys and trailing commas are not accepted. An escaped spelling of a name does not make it different from an ordinary spelling that decodes to the same name. Resolve ambiguous source data deliberately rather than deleting an arbitrary duplicate.
Nonfinite numbers and unsafe numeric integers are rejected by the implementation. Quoted identifiers remain text when that matches the data model, while other supported fractional numbers follow JavaScript numeric behavior. Unwrapping does not supply arbitrary numeric precision or exact decimal accounting. It also does not validate a business schema, confirm required fields or verify that the represented values are appropriate for a receiving application.
The source ceiling is one hundred thousand UTF-16 code units. The parser's limits include ten thousand values and forty nesting levels, and generated output is capped at one million characters. The outer representation's escapes count toward its own input length. A deeply nested or oversized document can fail even when its visible example resembles a much smaller valid fixture. Those limits should remain part of a reproducible test note.
A local text file import is separately bounded to one hundred thousand bytes. Selecting a file is not proof that its content matches the required outer-string contract. The local processor also has startup and processing deadlines. Cancel or a timeout does not establish that the inner document passed. Keep the source available and choose a smaller synthetic fixture when diagnosis requires a repeatable, bounded example.
Optional local drafts are plaintext browser storage activated by explicit controls. Do not save secrets or expect Reset to delete a saved draft. Copy and Download output provide the formatted inner result; they do not preserve every part of the original outer representation or the explanation on this page. Keep that original separately until the representation and destination requirements are understood.
Use unwrapping as one step in a review
A common task is reading a nested JSON-text field from an export. Confirm that the copied field includes a complete outer JSON string, not a user interface's shortened or independently escaped preview. Use a harmless representative fixture first, then compare the actual recovered structure with the source contract. The tool does not retrieve an export, authenticate to its origin or establish that the data is trustworthy.
Another practical use is checking a deliberate Wrap JSON as a string operation. A value-level round trip should recover the intended object, array or scalar after this page parses and formats it. It need not recover original indentation or alternate numeric spelling. Record which equality you need before treating a visually different output as a defect or a matching structure as proof of byte identity.
When a second text layer remains after one unwrap, stop and inspect the data model. Repeatedly applying parsers without understanding the layers can turn a diagnostic into an accidental transformation. This page has a specific two-stage contract, not a recursive decode-until-readable feature. The correct next action depends on the actual field specification rather than the number of backslashes visible in one display.
Finally, a successfully recovered document remains data requiring normal validation and privacy care. It is not permission to execute embedded text or send the result elsewhere. A useful review record keeps the original outer representation, the intended inner type, the chosen indentation and the verified output, while clearly identifying any application-specific checks that the parser did not perform.
Format reference (local parser policies are described separately): RFC 8259 JSON format reference.