Clarks Size Calculator

JSON Size Calculator

Describe your data: how many records, how many fields each, and the typical length of keys and values. The calculator estimates the size minified, pretty-printed and gzipped, so you can plan API limits and page weight.

  • Minified and pretty
  • Gzip estimate
  • Per-record size
Your data

From 1 to 10000000

From 1 to 200

From 1 to 60

From 1 to 500

For an array of flat objects. Nested objects add a few extra bytes for each level of braces.

Every quote, colon and comma in JSON takes a byte. An object with eight short fields can be twice the size of the data it carries. Key names repeat in every record, so long keys add up fast. Gzip removes most of that repetition, which is why compressed API responses are often 80% smaller.

JSON size limits

Common platform limits. Search for a service.

Typical payload limits
Service or settingLimitNotes
AWS API Gateway10 MBRequest payload
AWS Lambda (sync)6 MBRequest and response
Azure Functions HTTP100 MBRequest body
Express body-parser default100 KBRaise with the limit option
Nginx default1 MBclient_max_body_size
Firestore document1 MiBPer document
MongoDB document16 MBBSON size
localStorage5 MBPer origin, most browsers

Limits change over time. Check the current documentation for the service you use.

Record count and size

Eight fields per record. Slide the number of records.

Paginate API responses so each page stays under about 100 KB gzipped. Pages load fast and stay well inside server limits.

How JSON size adds up

Count the characters. Step through it.

Each field

"key":"value" is key + value + 5 bytes for quotes and colon.

Measure a real response in your browser's network panel. It shows both the transferred (compressed) size and the actual size.

Pretty, minified or gzipped

Three sizes of the same data. Compare them.

Indented and readable. Good for config files and debugging.

SizeLargest
ReadableYes
UseFiles, logs

Most web servers gzip JSON automatically. Brotli compression is often 15% to 20% smaller again.

Shrinking a JSON payload

Quick wins for faster APIs. Tick each item.

Tick each item as you go.

Removing unused fields is usually the biggest saving. Many APIs send every column when the page shows three.

What you get

Size from every angle. Each tile explains one result.

Minified

Size with no whitespace.

Pretty

Size with 2-space indents.

Gzipped

What travels over the network.

Per record

Average bytes per object.

Download time

At 10 Mbps, compressed.

The keys share shows how much of the payload is field names. Above 40%, shorter keys or a columnar format could help.

Frequently Asked Questions

How do I calculate JSON size?

Count every character including quotes, colons, commas and brackets. For plain ASCII each character is one byte.

How big is 1,000 JSON records?

With eight short fields each, about 200 KB minified and 40 KB gzipped.

Does whitespace count in JSON size?

Yes. Pretty-printing can add 20% to 40%. Minifying removes it.

How much does gzip reduce JSON?

Usually 70% to 90%, because key names repeat in every record.

What is the maximum JSON size?

JSON itself has no limit. Servers, APIs and databases set their own, often 1 to 10 MB.

Are non-English characters bigger?

Yes. In UTF-8 they take two to four bytes each.

Should I use shorter key names?

It helps uncompressed size. With gzip on, the saving is small.

Ship lighter JSON

Estimate the payload before you build, check it against your limits and turn on compression. Trim unused fields and paginate large lists, and your API will stay fast as the data grows.

More size calculators

Each one has its own calculator, worked examples and answers to common questions.

See all size calculators