{ } JSON Workbench0 network requests. Check DevTools

"JSON Analyzer":{ }

Paste JSON and get its byte size, maximum nesting depth, node counts, and value-type breakdown at a glance. Spot oversized payloads and over-nested structures before they hit your API. 100% in-browser, your data never leaves the tab.

What is a JSON analyzer and why use one?

A JSON analyzer reports structural stats (size, depth, node and type counts) that raw text hides. Developers use it to diagnose bloated API responses, catch runaway nesting, and decide where to trim before shipping.

Paste JSON and get its UTF-8 byte size, maximum nesting depth, node counts, and value-type breakdown at a glance. It runs 100% in-browser, so your data never leaves the tab.

Edge cases & gotchas

  • Empty {} and [] are nodes but contribute zero scalar values.
  • Byte size counts UTF-8 bytes; multi-byte chars (emoji, accents) exceed the character count.
  • Max depth counts nesting levels; a flat array of scalars is depth 1.
  • Duplicate keys (invalid but seen in the wild): repair parsing keeps the last; counts reflect the parsed result.
  • null is a distinct value type, separate from a missing key.
  • Large arrays of uniform objects dominate node count and are candidates for columnar restructuring.

Metrics reported

MetricMeaning
Byte sizeUTF-8 bytes of the input
Max depthDeepest nesting level
Total nodesObjects + arrays + values
Object / array countsContainer tallies
Value-type breakdownstring / number / boolean / null counts

How to use

  1. Paste or upload JSON into the Input pane.
  2. The tool parses (repair-aware) and computes stats instantly.
  3. Read byte size, max depth, total nodes, and per-type value counts.
  4. Use depth and size to find bloat, then minify or restructure heavy nodes.
  5. Confirm privacy in DevTools → Network (zero requests).

Examples

Basic object

Input
{"name":"api","port":8080,"tags":["a","b"]}
Output
size ≈ 42 B
max depth: 2
nodes: 1 object + 1 array + 5 values
types: string 3, number 1, array 1, object 1

Nested payload: depth

Input
{"a":{"b":{"c":{"d":1}}}}
Output
max depth: 4
4 objects, 1 number

Edge case: empty containers count as nodes

Input
{"items":[],"meta":{}}
Output
max depth: 1
nodes: 1 object (root) + 1 empty array + 1 empty object
scalars: 0

FAQ

What's a good maximum depth?

Keep it under ~5–6 levels; deeper nesting slows parsing and complicates access paths. Reduce it with Flatten JSON.

Why analyze JSON size?

Payload size drives network latency, parse time, memory, and API/egress cost.

What counts as a "node"?

Every object, array, and scalar value in the tree.

Byte size vs minified size?

Byte size is your input as-is (whitespace included); minifying strips whitespace for the real wire size.

Does whitespace affect parsing?

Slightly, but its main cost is bytes transferred, and gzip/brotli mostly erases that.

Is my JSON uploaded?

No. Analysis runs entirely in your browser.

Related tools