Skip to content
XUtilHub

JSON Unstringify – Parse Stringified JSON

Convert a stringified (escaped) JSON string back into formatted JSON. Handles multiple levels of escaping.

  • Free, no sign-up
  • Runs in your browser, nothing uploaded
Input
Output

About the JSON Unstringify

Turn stringified JSON (full of \" escapes) back into normal, formatted JSON. Multiple levels of stringification are unwrapped automatically.

Key features

  • Converts stringified JSON back into normal JSON
  • Unwraps multiple levels of escaping automatically
  • Pretty-prints the result with your choice of indent
  • Clear errors for broken escape sequences
  • Perfect for log lines and queue messages
  • Runs locally, nothing uploaded

Undo JSON.stringify

Stringified JSON is JSON that has been turned into a string, often more than once, as it passes through loggers, message queues and APIs. It's full of backslashes and impossible to read:

"{\"user\":{\"id\":42,\"roles\":[\"admin\"]},\"ok\":true}"

JSON Unstringify parses it repeatedly until it reaches the real data:

{
  "user": {
    "id": 42,
    "roles": ["admin"]
  },
  "ok": true
}

Levels of escaping

LevelLooks like
0 (normal JSON){"a":1}
1 (stringified)"{\"a\":1}"
2 (stringified twice)"\"{\\\"a\\\":1}\""

Each level adds another layer of backslashes. Unstringify removes them all.

Where it comes from

  • CloudWatch, Datadog and ELK logs, where the log message contains a JSON string.
  • AWS SQS / SNS messages relayed through Lambda.
  • Redis / localStorage values.
  • Postman collections and test fixtures stored as strings.
  • Buggy services that call JSON.stringify on data that's already a string.

Fixing double encoding at the source

If your API returns stringified JSON unintentionally, look for code that serializes twice. A common example in Node.js:

// Wrong: body is already a string
res.json(JSON.stringify(data));
// Right
res.json(data);

Create stringified JSON with JSON Stringify. For plain text strings with escapes (not JSON), use JSON Decode.

How to use the JSON Unstringify

  1. Paste your data into the input box, upload a file, or click Sample to try it out.
  2. Adjust the options above the editor if you need to (indentation, delimiter, and so on).
  3. The result appears instantly in the output panel. Any errors are shown with their line and column.
  4. Click Copy to copy the result, or Download to save it as a file.

Frequently asked questions

How do I know my JSON is stringified?

It starts and ends with a double quote and contains lots of \" sequences, for example "{\"id\":1}". Nested stringification shows up as \\\" (escaped backslashes).

How many levels can it unwrap?

Up to five, which covers every real-world case we've seen. It stops as soon as the result is no longer a JSON string.

What if only one field inside my JSON is stringified?

Copy that field's value (including its quotes) and unstringify it separately. This tool unwraps the top-level value.

Is this the same as JSON.parse?

It's JSON.parse applied repeatedly until real JSON is reached, then formatted for reading.

Is my JSON uploaded to a server?

No. All JSON tools run entirely in your browser, so your data never leaves your device.

Is there a size limit?

There is no fixed limit. Files of several megabytes work fine; very large files depend on your device's memory.

Do I need an account?

No. Every JSON tool is free and works without signing up.

Last updated:

Related JSON tools