JSON Size AnalyzerONLINE

Measure UTF-8 bytes, characters, nesting depth, and JSON value counts.

1 MiB per input · Ctrl / ⌘ + Enter to run

The byte count measures the exact input text, including whitespace. Counts include objects, arrays, properties, items, and scalar values.

Result
Ready. Paste input, then run the tool.
Your JSON stays in your browser. Core processing happens locally.
THE PRACTICAL GUIDE

Measure JSON file size, structure, and nesting depth

The size analyzer measures the exact JSON text and summarizes its structural complexity. It helps explain whether payload size comes from whitespace, long strings, or a broad/deep structure.

When should you use it?

  • Check an API payload against a byte limit.
  • Compare object depth before building a viewer.
  • Estimate how many records or scalar values a fixture contains.
WORKED EXAMPLE

Example: measure text and structure

The byte count includes braces, quotes, punctuation, and values in the exact source text.

JSON input
{"a":[1,true]}
Selected measurements
UTF-8 bytes: 14
Objects: 1
Arrays: 1
Array items: 2

Use bytes when the question is file or request size

A character and a UTF-8 byte are different units. ASCII text commonly occupies one byte per character, while many other characters require several. This analyzer measures the actual UTF-8 input and counts structural features such as values, properties, array items, and depth. Those numbers help distinguish a whitespace-heavy document from one containing many records or long string values.

Measure the layer that has the limit

An API gateway may limit the request body; a browser store may have a quota; an LLM has a token budget. Those limits do not all use the same unit. Use Minifier to compare removable layout and Token Counter for the supported tokenizer. The analyzer does not predict gzip size, heap memory consumption, or network timing. Measure those in the system where they matter.

IN PRACTICE

How do I measure the UTF-8 size and nesting depth of JSON?

Paste the exact text you plan to send or store. The report counts its UTF-8 bytes, UTF-16 code units, values, properties, array items, and maximum depth. Whitespace counts toward bytes, so a formatted and minified copy can have different sizes with the same JSON structure.

JavaScript: byte length of the same source text

javascript
const source = '{"a":[1,true]}';
console.log(new TextEncoder().encode(source).length); // 14

This mirrors the UTF-8 byte concept in the report. It does not measure a gzip response body or the memory used by a parsed object.

Non-ASCII characters can occupy multiple UTF-8 bytes, while JavaScript string length counts UTF-16 code units. Use the byte figure for a byte-limited transport and inspect the destination’s own limits.

BEFORE YOU USE THE RESULT

What should you check before using the result?

These are measurements of this input text, not compressed transfer size or memory use in another program. Minify the source separately to compare structural whitespace.

Understand JSON syntax

Technical reference: JSON syntax and interoperability · RFC 8259

THE JSON FIELD GUIDE
All guides