JSON Size Analyzer & Treemap

Visualise JSON payload size by key, compare two objects, and get optimization suggestions.

Last reviewed: April 2026

New to this tool? Click here for instructions

JSON Input
Paste JSON above to analyze its size breakdown.

How to Use the JSON Size Analyzer

To use the JSON Size Analyzer, simply paste your JSON object into the input field. The tool will display the total size, a colour-coded treemap, and a sortable table of every key with its path, type, byte count, and percentage share. For comparing two JSON objects, paste them side by side and the tool will highlight keys that grew, shrank, or are missing in one version. To optimize your JSON, the tool will provide actionable suggestions such as null fields that could be omitted, empty arrays/strings, long key names, and estimated byte savings.

When to Use the Tool in Real Workflows

The JSON Size Analyzer is ideal for developers working with APIs that require efficient data transfer. It's particularly useful when dealing with mobile applications where network latency can significantly impact user experience. By identifying and optimizing large JSON payloads, developers can reduce response times and bandwidth usage, leading to faster and more responsive applications.

How It Works

The JSON Size Analyzer uses the browser's Blob API to measure the size of JSON objects in UTF-8 bytes. It provides a visual treemap to help you identify which keys are consuming the most space, making it easier to optimize your JSON payloads. The tool also offers actionable optimization suggestions to help you reduce the size of your JSON objects.

Tips, Edge Cases, or Limitations

While the JSON Size Analyzer is a powerful tool, it's important to remember that it measures size in UTF-8 bytes. This means that accented characters, emoji, and CJK characters can occupy more space than ASCII characters. Additionally, the tool assumes that the JSON is well-formed and does not handle syntax errors gracefully. For very large JSON objects, the tool may take some time to process.

Frequently Asked Questions

JSON size directly affects API response times, bandwidth costs, and mobile data usage. Large payloads slow page load times, increase time-to-interactive, and can cause timeouts on slow connections.
The tool measures size in UTF-8 bytes using the browser's Blob API. ASCII characters occupy 1 byte each, while accented characters, emoji, and CJK characters occupy 2-4 bytes.
Common strategies include enabling GZIP or Brotli compression, omitting null values, using sparse fieldsets, shortening repetitive key names, and removing empty arrays/strings.
A treemap visualization represents each top-level key in your JSON as a coloured block. The area of each block is proportional to the number of bytes that key's value occupies.
While gzip compression can significantly reduce the size of JSON payloads, it's still important to optimize your JSON for the best performance. Compression should be used in conjunction with other optimization strategies.