Free Online JSON Size and Structure Analyzer
Find out which part of a JSON document is making the file big. Every branch is weighed in UTF-8 bytes and ranked, the cost of repeated key names is counted on its own, and the real saving from minifying is measured rather than estimated. Counts of nulls, empty values, depth and the widest array come with it.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Analyze a JSON File
A few steps, and nothing is uploaded.
What to Know About These Numbers
What is measured, how, and which savings are real.
customer_display_name is written ten thousand times, and the name alone can be a third of the file. Nothing else tells you this, and the fixes are real: shorter names, or a shape where the keys appear once and the rows are arrays.
orders is the whole array with all its records, which is why the top level ranking adds up to roughly the file size. Looking two levels down splits that into the parts, and the parts of a branch add up to slightly less than the branch, because the punctuation holding them together belongs to the parent.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About Analyzing JSON Size
A JSON file that has grown too large is a common problem with an uncommonly unhelpful set of tools. You can see that the file is nine megabytes. What you need to know is which nine hundred kilobytes of it you could remove, and that means weighing the parts rather than counting them. A branch count or a key count tells you almost nothing, because one branch with four keys can be most of the document while thirty branches at the top level are rounding errors.
The measurement that surprises people is the cost of the key names. JSON writes out every key for every record, so a list of ten thousand orders with a field called customer_display_name contains that string ten thousand times. Twenty three characters times ten thousand is a quarter of a megabyte spent on one field name, before any of the values. In records with many short fields the names routinely outweigh the data, and because almost nothing reports this, people go looking for savings in the values instead.
The honest caveat belongs next to it: if the file is served over HTTP with compression enabled, most of that repetition costs almost nothing, because removing repetition is exactly what gzip does. So the right order is to check whether compression is on, which is usually a one line change, and only then consider restructuring the data. A tool that showed you the key cost without saying this would be encouraging the harder fix over the easier one.
Everything here is measured rather than estimated. Bytes are counted as UTF-8 because that is what a file weighs. The minified size comes from actually writing the document out without indentation and weighing the result. The weight of a branch comes from serialising that branch. None of this is expensive to do in a browser, and it means the numbers are the real ones rather than approximations that happen to be close most of the time.
Frequently Asked Questions
Bytes, keys, minifying and compression.
Every Other JSON Tool
10 more tools in this set. All free, all in your browser.