ModernCalcs

JSON Size Analyzer

Analyze the structure and size of any JSON document — count keys, values, nesting depth, type distribution, and byte size. Useful for optimizing payload sizes.

JSON Input

Analysis

Total Keys13
Total Values16
Objects4
Arrays1
Array Items2
Strings8
Numbers2
Booleans1
Nulls0
Max Depth4
Raw Bytes343 B
Minified Bytes236 B
Longest Keylocation
Longest StringFull-stack developer

JSON Size Analyzer: Optimize API Payloads

Over-fetching and large JSON payloads are a common source of slow API responses and high bandwidth costs. This analyzer gives you a full breakdown of your JSON document — total keys, nesting depth, type distribution, and the difference between raw and minified byte size — so you can identify bloat and optimize accordingly.

Frequently Asked Questions

What is the difference between raw bytes and minified bytes?

Raw bytes counts the actual characters in your input including whitespace and indentation. Minified bytes shows how large the JSON would be with all unnecessary whitespace removed — this is what gets transferred over the network in production.

What counts as a key vs a value?

Keys are object property names. Values include all leaf nodes: strings, numbers, booleans, and nulls, plus the count of array and object containers themselves.

Why does max depth matter?

Deeply nested JSON (depth > 20) can cause stack overflow errors in some parsers and makes data harder to query. Most REST APIs keep depth under 5–6 levels.

How is max depth measured?

Depth is measured from the root (depth 0). A value directly on the root object is at depth 1. Each level of nesting adds 1.

What is a good JSON payload size for APIs?

REST API best practice: keep responses under 100KB for mobile clients. For web clients, under 500KB is generally acceptable. Anything larger should be paginated or streamed.

Does this count array index keys?

No — array indices are not counted as keys. Only object property names are counted as keys. Array items contribute to the value count and array item count.