All free tools Runs in your browser

JSON Size Calculator

See how many bytes your JSON really takes, how much minifying and gzip save, and which keys make it heavy.

Measure a JSON payload

Bytes
Paste an API response, a webhook body or a stored document. Sizes are counted in UTF-8 bytes, the way servers and APIs measure them.
Read locally with FileReader and never uploaded. Maximum 15 MB.

Your JSON never leaves this device. Sizes are measured and compressed by your own browser. Nothing is uploaded to VPSLake or stored.

Measure JSON in four steps

Check a payload against an API limit, plan storage, or find out why a response is slow.

  1. 1

    Paste or open the JSON

    Paste the payload or open a file. It must be valid JSON; errors are shown with line and column.

  2. 2

    Calculate

    Press Calculate size to get the byte size as pasted, minified, pretty-printed and gzipped.

  3. 3

    Find the heavy parts

    The table ranks every top-level key or array item by its share of the minified size.

  4. 4

    Save the report

    Copy the report or download it as text to attach to a ticket or a pull request.

Bytes, not characters

API gateways, message queues and databases limit size in bytes. In UTF-8 an English letter takes one byte, but an accented letter takes two, most Indian scripts take three per character and an emoji takes four. That is why the byte size can be larger than the character count.

  • 1 KB here means 1,024 bytes
  • Minified size is what most APIs actually send
  • Gzip size is close to what crosses the network

Making a response smaller

Start with the biggest row in the table. Common fixes are removing fields the client never reads, paginating long arrays, using shorter repeated keys, and dropping null values.

On your own VPS, make sure the web server compresses JSON. In nginx add application/json to gzip_types; in Apache enable mod_deflate for that type. Check with curl -sI -H 'Accept-Encoding: gzip' URL and look for Content-Encoding: gzip.

JSON Size Calculator FAQ

No. The size, the statistics and even the gzip estimate are calculated by your browser. Nothing is sent to VPSLake or stored.
The pasted size includes every space, tab and line break you pasted. Minified size removes all optional whitespace, which is what a well-configured API sends.
It uses your browser's built-in gzip compressor on the minified JSON, so it is a real compressed size. Your server may use a different compression level or Brotli, so the number on the wire can differ slightly.
How many objects or arrays sit inside each other at the deepest point. A flat list of values is depth 1. Some parsers and databases limit depth, and very deep JSON is harder to read and query.
Each row counts a key, its colon and its value. The commas between rows and the outer brackets belong to no single key, so they are left out.
It varies: many gateways cap request bodies at around 1 MB to 10 MB, and PHP's post_max_size defaults to 8 MB. Check your provider's documentation and compare it with the minified size here.