JSON Size Calculator
Estimate JSON document size from record count and field structure.
About JSON Size Calculator
JSON repeats every key name in every record, so key length multiplies across the dataset. On wide records with short values the keys can exceed the data itself. This repetition is why columnar and binary formats are far smaller for large datasets, and why shortening key names measurably reduces API payloads.
Formula
JSON Size
Size = records × fields × (key + quotes + value + separators + indentation)
- structural overhead
- Braces, quotes, colons, commas and repeated key names
Worked example
With the default values below, JSON Size Calculator returns Total JSON Size of 2.4223. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Number of recordsminimum 0
- 5,000
- Fields per recordminimum 0
- 12
- Average key lengthminimum 0
- 14
- Average value lengthminimum 0
- 18
- Pretty printedone of Yes, with indentation, No, minified
- Yes, with indentation
Results
- Total JSON Size
- 2.4223 MB
- Bytes per Record
- 508.0 bytes
- Total Size
- 2,540,000 bytes
- Size Consumed by Repeated Keys
- 0.9727 MB
- Share That Is Syntax and Keys
- 57.48%
Step by step
- 1Values used
- 2JSON Size
- 3Total JSON Size= 2.4223 MB
- 4Bytes per Record= 508.0 bytes
- 5Total Size= 2,540,000 bytes
- 6Size Consumed by Repeated Keys= 0.9727 MB
- 7Share That Is Syntax and Keys= 57.48
Assumptions and limits
- The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How is JSON Size calculated?
Size = records × fields × (key + quotes + value + separators + indentation) JSON repeats every key name in every record, so key length multiplies across the dataset. On wide records with short values the keys can exceed the data itself.
Why does JSON Size matter?
This repetition is why columnar and binary formats are far smaller for large datasets, and why shortening key names measurably reduces API payloads.
What values do I need to enter?
This calculator takes 5 inputs: Number of records, Fields per record, Average key length, Average value length, Pretty printed. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
