JSON Tools Hubjsontoolshub.com

JSON Analyzer

Analyze JSON structure when you need concrete payload metrics rather than raw formatted text or visual tree browsing.

JSON Parser & Analyzer

Input0 chars
Line 1, Col 1

JSON structure and payload metrics

The JSON Analyzer parses valid JSON and walks every value node using explicit, documented rules: root starts at depth 1 (so {"a":[{"b":1},null]} yields maxDepth = 4), Total Keys sums all object properties visited (without deduplicating repeated keys across array objects), and Total Nodes counts every root, container, and primitive value. Pre-parse lexical checks warn if duplicate keys or unsafe integers exist.

Features and output

  • Reports Max Depth (root counted as depth 1), Total Keys, and Total Nodes
  • Counts exact distributions of objects, arrays, strings, numbers, booleans, and nulls
  • Measures exact UTF-8 byte size alongside a transparent 2.4x V8 RAM heuristic
  • Outputs machine-readable JSON metrics in the Formatted tab for quick copy/download

When to use this tool

  • Check maximum nesting depth against mobile, ORM, or serverless recursion limits
  • Audit null density and property counts across inconsistent third-party API payloads
  • Inspect payload metrics before modeling schemas or splitting API endpoints

Practical example

Sample Input
{"a":[{"b":1},null]}
Expected Output
{
  "isValid": true,
  "totalKeys": 2,
  "maxDepth": 4,
  "typesCount": {
    "string": 0,
    "number": 1,
    "boolean": 0,
    "null": 1,
    "array": 1,
    "object": 2
  },
  "totalNodes": 5,
  "byteSize": 20,
  "estimatedMemoryBytes": 48,
  "rootType": "Object"
}

Counting convention verified: root = depth 1 -> "a" array = depth 2 -> {"b":1} = depth 3 -> value 1 = depth 4. Est. RAM is a 2.4x serialized byte heuristic, not live V8 heap telemetry.

Common errors & troubleshooting

  • Syntax errors prevent traversal and clear previous metrics cards.
  • Duplicate keys in a single object collapse inside standard JSON.parse; watch for the warning banner.
  • Nested keys are not deduplicated across array elements (two objects with "id" add 2 to Total Keys).

Limitations & edge cases

  • Est. RAM (~2.4x UTF-8 bytes) is a rough estimation formula rather than measured JS heap allocation.
  • Does not evaluate JSONPath queries or benchmark external parser throughput.
  • For visual key-by-key tree navigation, open JSON Viewer.

Developer tip: Switch directly to the Tree View tab inside the analyzer workspace to inspect which branch reaches Max Depth.

How to use JSON Analyzer

  1. 1Paste valid JSON into the input editor (or upload/drop a .json file).
  2. 2Click Analyze JSON (or press Cmd/Ctrl + Enter) to compute structural metrics.
  3. 3Read the Metrics cards, or switch to the Formatted tab to copy the JSON report.

Privacy note: Processing runs locally in your active browser tab. Avoid pasting live production secrets or tokens.Verified against implementation: November 2026

JSON Analyzer Reference

Frequently asked questions

How is JSON nesting depth calculated here?

The root value is assigned depth 1, and each nested array item or object property increments depth by 1. Thus {"a":[{"b":1},null]} has a maximum depth of 4.

Why do Total Keys and Total Nodes differ?

Total Keys sums property entries inside all objects (e.g. "a" + "b" = 2), while Total Nodes counts every container and leaf value visited (root object + array + inner object + 1 + null = 5).

How accurate is the Est. RAM value?

It is an approximate memory estimate calculated as Math.round(utf8ByteLength * 2.4) to reflect typical JS engine object overhead, not a live browser heap reading.

Does analyzing detect duplicate object keys?

While parsed counts reflect deduplicated keys from JSON.parse, our pre-parse lexical scanner warns in the status banner if any duplicate keys were detected in the raw input (up to 2 MB).

Related tools and contextual links

View all 16 tools →
Verify JSON syntax before analysis →

Pinpoint syntax errors with line/column diagnostics if parsing fails.

Explore nested values in a tree →

Expand, search, and copy paths across complex analyzed structures.

Export structured rows to CSV →

Turn arrays of analyzed objects into flattened spreadsheet columns.