WebToolsForAll

Tools / Data Converters

JSON string to JSON document

Read one quoted JSON string whose contents are a JSON document.

Input

0 UTF-16 code units

Optional local draft

Saving stores a plaintext draft in this browser on this device. Do not save secrets or use this on a shared device. Nothing is saved or loaded automatically. Reset does not delete a saved draft; use Delete local draft.

No draft has been loaded.

Import a local text file

Output

Work through the task

Unwrap one JSON string whose content is itself a JSON document.

  1. Enter the complete outer quoted string, including its escapes.
  2. Both the outer string and inner document must pass strict checks. A JSON object supplied without the outer string is rejected.
  3. Review the result before copying or downloading. Editing an input invalidates the previous result; keep an original if the transformation matters.

Example to check

The outer string "{\"v\":\"007\"}" unwraps to the object {"v":"007"}.

Limits and output behavior

Up to 100,000 input characters, 10,000 values and 40 data levels. Strict JSON rejects duplicate keys, trailing commas, nonfinite numbers and unsafe integers; quote large identifiers to retain their digits.

Troubleshooting

Keep the outer quotation marks and required escapes. Both the outer string and its decoded inner document must be valid; a bare object is the wrong input shape.

Questions

Why is a bare JSON object rejected here?

This operation unwraps a JSON string containing a document. Use the JSON formatter for a document that is already an object or array.

Input and privacy

Processing runs in this browser. Inputs are not saved automatically. An explicitly chosen local draft, where offered, is plaintext storage on this device. Downloaded files, clipboard contents and browser extensions have separate retention behavior.