Overview
Introduction
Before diving into an unfamiliar JSON payload, it helps to know its shape at a glance: how deeply nested is it, how many keys does it have, how big is it. Scrolling through raw JSON to answer those questions by eye is slow and error-prone.
This tool computes that summary instantly, giving you a structural fingerprint of any JSON document.
What Is JSON Analyzer?
A JSON analyzer that walks the parsed document once and tallies structural statistics: maximum nesting depth, counts of objects and arrays, total and unique key counts, a breakdown of value types (strings, numbers, booleans, nulls), and the document's byte size.
The result is presented as a small grid of stat tiles rather than a wall of numbers to parse manually.
How JSON Analyzer Works
After parsing and validating the input, a single recursive traversal visits every object and array, incrementing counters for each container type encountered and tracking the deepest level of nesting reached along any path.
Leaf values are classified by their JavaScript type (string, number, boolean, or null) and tallied separately, while the byte size is measured directly from the original input text via the browser's UTF-8 text encoder.
When To Use JSON Analyzer
Use it when you receive an unfamiliar JSON payload, an API response, a data export, a config file, and want a quick sense of its scale and complexity before working with it further.
It's also useful for sanity-checking that a payload matches expectations, e.g. confirming a supposedly 'flat' API response really has a depth of 1.
Often used alongside JSON Key Extractor, JSON Object Flattener and JSON Validator.
Features
Advantages
- Gives a complete structural summary in a single pass, no manual counting required.
- Distinguishes total key occurrences from unique key names.
- Measures exact byte size rather than character count, which matters for non-ASCII text.
Limitations
- Statistics describe structure only; they don't flag semantic issues like missing expected fields.
- Very large documents may take a moment to fully traverse in the browser.
Examples
Best Practices & Notes
Best Practices
- Use this as a first step when exploring an unfamiliar API response, before deciding how to parse or process it.
- Compare stats across multiple sample payloads from the same source to spot structural drift over time.
- Pair with Extract JSON Keys if the key counts here prompt you to see the actual key names.
Developer Notes
Depth is computed as the maximum across all recursive branches (using Math.max over each child's returned depth), not the depth of the first or last path visited, so an unevenly nested document correctly reports its deepest branch rather than an arbitrary one.
JSON Analyzer Use Cases
- Getting a quick structural summary of an unfamiliar API response
- Confirming a JSON payload's depth and size before writing a parser for it
- Comparing the complexity of two JSON documents at a glance
Common Mistakes
- Confusing 'total keys' with 'unique keys' when interpreting how repetitive a document's structure is.
- Assuming byte size equals character count; multi-byte UTF-8 characters make these diverge.
- Expecting semantic validation (e.g. required fields present); this tool only reports structural statistics.
Tips
- A surprisingly high max depth often signals a document that would benefit from Flatten a JSON Object before further processing.
- Watch the size stat when preparing payloads for systems with strict request size limits.