Sometimes your JSON brings more JSON. A webhook wraps a payload as a string. A log field stores an escaped object. An API returns "metadata": "{\"source\":\"demo\"}" and expects you to smile about it.
A nested JSON viewer is for that moment: expand the inner document into a real structure, search it, and stop hand-unescaping quotes like it’s 2014.
What “JSON inside JSON” looks like
Outer objects are often valid. The awkward part is a string value that contains JSON text.
Sample (fictional):
{
"request_id": "demo_1042",
"event": "order.updated",
"payload_raw": "{\"order_id\":\"ord_9001\",\"status\":\"needs_review\",\"customer\":{\"name\":\"Example Company\"},\"items\":[{\"sku\":\"DEMO-01\",\"quantity\":2}]}",
"headers": {
"content_type": "application/json",
"authorization": "Bearer Token sample_token_not_real_0000"
},
"debug_note": "Sample data only"
}
payload_raw is a string. Until you parse that string, a normal pretty-printer only shows a long escaped line. A nested-aware viewer can turn supported JSON-inside-strings into expandable objects so you inspect the inner order_id without a separate script.
Your JSON has layers. Expand buttons are the polite response.
Tree view, then nested expansion
A solid workflow stacks three ideas:
- Pretty print / unminify the outer document
- Open a collapsible JSON tree view
- Expand nested JSON strings where the tool supports detection
After expansion, the inner content behaves like ordinary structure: open customer, collapse items, search for DEMO-01.
For a broader viewer overview (local demo, minify/copy), see Free online JSON viewer & formatter.
Why nesting shows up so often
Webhooks and queues
Producers serialize an object, then place that serialization into another envelope. Consumers are supposed to parse twice. Debugging in the middle means you see the escaped form first.
Logging pipelines
Teams store “the request body” as a string field so the log schema stays flat. Helpful for storage; rough on humans.
Multi-tenant or passthrough APIs
A platform forwards partner payloads as opaque strings. Your job is still to find the failing field at 4 p.m.
Double encoding accidents
Someone called JSON.stringify on a value that was already a string. Now you have extra escaping. Nested viewing helps you see the intended object; fixing the producer is a separate task.
Search beats endless scrolling
Once nested content is expanded, search across keys and values is the difference between “I know it’s in here” and “I found it.”
Try goals like:
- Find
needs_reviewin a large tree - Jump to
order_idwithout expanding every sibling - Confirm a sample
api_keyfield is only in the place you expect before you trim an example for a ticket
Search highlights matching keys and values so you can jump between results and inspect their context.
Edit carefully after you expand
Nested inspection often leads to cleanup:
- Remove a debug field from an example
- Change a status for a fixture
- Copy pretty-printed inner JSON into a unit test
Keep edits intentional. Removing keys in a viewer is manual editing - not automatic redaction or anonymization. Use fictional data in screenshots and docs (demo_1042, Example Company, [email protected]).
If the outer document won’t parse at all, fix syntax first: Repair malformed JSON. Nesting features assume you have a readable structure to open.
What nested viewing supports
Pretty Payload can turn supported JSON stored inside strings into expandable objects. That is not a promise that every encoding, every binary wrapper, or every almost-JSON fragment will expand cleanly.
Expanding a JSON string changes its type from a string into an object or array. Check the result before copying it back to a system that expects the original encoded string. Keep an untouched copy when the original representation matters.
Local processing while you dig
Nested payloads can include customer records and internal application data. Prefer a viewer that processes JSON locally in the browser.
Pretty Payload: processes your JSON locally in your browser; inspected payloads are not uploaded for processing.
Try nested inspection in the web demo (free, no signup). For repeated clipboard and page workflows, the Chrome extension offers 10 free opens with no signup, then a 30-day trial with email and no card - install from the homepage. Compare workflows in Extension vs paste sites.
A short nested debugging checklist
- Pretty-print the outer JSON
- Locate string fields that look like objects or arrays
- Expand supported nested JSON into the tree
- Search for the key or value that explains the issue
- Copy only the slice you need for the ticket
- Review any repairs if the outer document was malformed
Keep the original beside your edited example so you can compare the result.
FAQ
What is a nested JSON viewer?
It’s a JSON viewer that helps you inspect JSON text stored inside string fields - expanding supported nested content into a collapsible tree instead of leaving it escaped.
Is nested JSON invalid?
Not necessarily. The outer document can be valid JSON while a value is a string that contains JSON text. Validity and convenience are different problems.
Can I just pretty-print to fix nesting?
Pretty-print helps the outer structure. Escaped inner JSON usually remains a string until something parses or expands it. Use a nested-aware tree for the inner document.
Does Pretty Payload expand every possible nested encoding?
No. It targets supported JSON-inside-string cases. Unusual encodings may still need a manual parse step.
Where should I try this with sample data?
Open prettypayload.com/try/, paste a sample with an escaped object in a string field, expand it, and search for an inner key like order_id.
Next step
When the payload contains another payload, don’t fight the escapes by hand.
Try the web demo: prettypayload.com/try/
Prefer clipboard-first debugging? Add Pretty Payload to Chrome.
Example: from escaped string to usable fields
Starting from the sample above, a nested-aware pass should let you treat the inner document more like this mental model:
{
"order_id": "ord_9001",
"status": "needs_review",
"customer": {
"name": "Example Company"
},
"items": [
{
"sku": "DEMO-01",
"quantity": 2
}
]
}
You still keep the outer envelope for context (request_id, event, headers). You open the inner tree only when the bug lives there. That separation - envelope vs payload - is the whole point of a nested JSON viewer.