1001Ferramentas
⚖️ Dev

JSON Size Analyzer

Analyzes a JSON payload and shows how many bytes each key takes, sorted by weight, with percentage of total and the full path per node.

How the bytes are counted

Every node is measured as the UTF-8 byte length of its minified JSON form, so indentation in the pasted text never inflates a field. Accented letters cost two bytes and emoji cost four, which is why a short label in Portuguese can weigh more than an English one of the same length.

With the key cost turned on, a node also pays for its own name, the colon and the comma that separates it from the next sibling. That is what makes the repeated-keys block useful: a name such as createdAt repeated 340 times costs around 4 KB before any value is counted, and renaming it is often a bigger win than trimming the values.

Find out which JSON field weighs most

An API response that grew from 40 KB to 300 KB rarely grew evenly: one specific field usually dragged the rest along. Paste the JSON here and you get the weight of every node in bytes, its share of the total and the full path, in the style $.data.items[0].summary. The list is sorted from heaviest to lightest, so the culprit tends to show up in the first row.

Sizes are measured on the minified form, in UTF-8 bytes, not on the text you pasted. Indentation therefore never inflates a field, and the summary still tells you how much of the payload is pure whitespace. Keep in mind that an accented letter costs two bytes and an emoji costs four, so a short label in Portuguese can outweigh an English one of the same apparent length.

The detail that usually saves the most sits in the repeated-keys block. With the key cost turned on, each node also pays for its own name, the colon and the comma separating it from the next sibling. A name such as createdAt repeated 340 times already costs around 4 KB before any value is counted, and shortening it often beats trimming the values themselves.

Frequently asked questions

Why do the node sizes not add up to the total?
Two reasons. The braces and brackets wrapping the root object belong to no child, and the table only lists paths down to the depth you picked, while the total measures the whole document. Raising the depth details more levels, yet the total stays exactly the same.
What changes when I turn off the key name cost?
Each node is then worth only the bytes of its own value, with no name, no colon and no comma. That view helps when comparing content across fields; leaving the cost on shows the real price that field carries inside the payload actually sent over the wire.
Can I analyze a large JSON of a few megabytes?
Yes, and everything runs in your browser, with nothing uploaded to any server. Above 3 MB the page warns that the analysis may freeze the tab for a few seconds, since every node is serialized to be measured. Lowering the depth does not speed it up: the scan still walks the whole tree.

Related Tools