JSON Document 0 B
Ready
0 chars
Statistics
Statistics will appear here...
0 nodes
Features

Understand your JSON at a glance

🔢 Type counts

See the exact number of objects, arrays, strings, numbers, booleans, and nulls in your JSON. Useful for spotting unexpected value types in API responses.

📏 Depth analysis

Find the maximum nesting depth of your JSON. Deeply nested structures can be a sign that data needs flattening or that an API response is overly hierarchical.

🔑 Key frequency

See which keys appear most often across all objects. Identify common fields, spot duplicate keys, and understand the shape of array-of-object data.

📊 Numeric ranges

For all numeric values, get the minimum, maximum, sum, and average. Quickly spot outliers and verify that numeric fields fall within expected bounds.

🔤 String analysis

For all string values, get the minimum, maximum, and average length, plus the total character count. Helpful when estimating storage or display requirements.

💾 Size info

Get the total byte size of your JSON (UTF-8) and the character count. Estimate payload size before sending it over the network, with no round-trips required.

FAQ

Analyzing JSON — common questions

What statistics does JSONLab compute?

JSONLab computes a comprehensive set of structural statistics: total node count, maximum nesting depth, type counts (objects, arrays, strings, numbers, booleans, nulls), key frequency (the most common keys across all objects), numeric value ranges (min, max, sum, average), string length statistics (min, max, average, total characters), and the total UTF-8 byte size of the JSON.

Each section is rendered independently in the right pane, so you can scan the parts you care about most. Click Copy report to export the full statistics as a JSON object for further analysis.

The statistics are recomputed live as you edit the input, with a small debounce for performance on large documents.

How fast is the analysis?

The statistics engine walks the JSON tree in a single pass, so the algorithm is linear in the number of nodes. Typical API responses (a few KB) are analyzed in single-digit milliseconds, and you'll see the analysis time displayed in the status bar.

For multi-megabyte JSON, analysis typically completes in under a second. The bottleneck is usually JSON parsing rather than the statistics walk itself.

Live updates are debounced by 200ms, so even if you paste a large document and immediately start editing, the tool won't re-analyze on every keystroke.

Can it handle large JSON files?

Yes. There is no artificial size limit. The walker uses constant memory beyond the parsed JSON itself, so memory usage scales with the size of the document rather than its nesting depth. Files up to 50MB have been tested successfully on a mid-range laptop.

For very large files, parsing may take a moment (usually under 2 seconds for 50MB), but the statistics walk itself is near-instant. If you work with extremely large documents regularly, consider using JSON Flatten first to reduce nesting.

The output panel caps the number of displayed top keys at 50 to keep the page responsive when the JSON has thousands of unique keys.

Is my JSON sent to a server?

No. All analysis happens entirely in your browser. You can verify this in your browser's network panel — after the initial page load, no further requests are made. Your JSON never leaves your device.

This makes JSONLab suitable for analyzing sensitive data: production logs, customer records, internal API responses, and proprietary configurations. Even the share feature encodes data into the URL hash rather than transmitting it.

You can also save the page for offline use; once cached, it works without an internet connection.

What are common use cases?

Developers use JSON Statistics to understand unfamiliar API responses before writing integration code, estimate payload sizes for network planning, find duplicate or unexpected keys in third-party data, validate that numeric fields fall within expected ranges, and prepare inputs for schema generation.

It's also useful when reverse-engineering JSON from services with poor documentation — by looking at key frequency and type counts, you can quickly infer the structure of a response without reading a spec.

Data analysts use it to estimate storage requirements and identify outliers in bulk JSON exports before importing them into databases or BI tools.