Analyse JSON size and structure

Measure JSON size, depth, node counts, and primitive type distribution.

freeworks offlinenothing uploaded
ToolJSON Size Analyzer
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The document is parsed and walked recursively to count objects, arrays, keys, values, maximum depth, and primitive types. Compact and formatted serialized lengths show transport size versus readable size.

  • Compact length approximates a minified payload.
  • Depth starts at the root for consistent comparisons.

Worked example

Analyze API Response
Get size and structure metrics for a JSON API response
Input
											{
  "users": [
    {"id": 1, "name": "Alice", "active": true},
    {"id": 2, "name": "Bob", "active": false}
  ],
  "total": 2
}
										
Output
												Path             Size
---------------  ----
users            76
users[0].name    7
users[1].name    5
users[1].active  5
users[0].active  4
											

When to use this

Payload budgets, cache planning, and deep-response debugging use these measurements.

Edge cases

  • Repeated strings count each occurrence toward size.
  • An empty object is a node with no leaf values.
  • Large integer text affects serialized length even when its mathematical structure is simple.

References