We Value Your Privacy

We use cookies to enhance your browsing experience and analyze site traffic. All calculations happen locally in your browser - we never see or store your data. Learn more in our Privacy Policy

/
/
CalculateYogi
  1. Home
  2. Technology
  3. JSON Size Calculator
Technology

JSON Size Calculator

Paste JSON to measure exact bytes, KB and MB, see real gzip size, find which keys cost the most, and check it against AWS, GCP and cookie limits.

Try a real payload

Nothing leaves your browser — sizes and compression are measured locally.

Where these numbers come from

Two different questions, two different numbers. Platform limits apply to the uncompressed payload, so the fit check uses your minified size — compressing a 500 KB item does not make it fit a 400 KB ceiling. Gzip tells you what the response costs to send.

AWS states its own quotas in binary units — its DynamoDB documentation spells out that 1 KB means 1024 bytes — so every limit below is compared on that basis.

  • HTTP cookie — 4096 bytes vendor docs
  • DynamoDB item — 400 KB vendor docs
  • Firestore document — 1 MiB vendor docs
  • Lambda (async) — 1 MB vendor docs
  • Amazon SQS message — 1 MiB vendor docs
  • Lambda (sync) — 6 MB vendor docs
  • API Gateway (REST) — 10 MB vendor docs
  • Pub/Sub message — 10MB vendor docs
Did this calculator solve your problem today?

Contributor

Reviewed by

Last updated: August 17, 2026
SupportI build these free tools with love, late nights, and way too much coffee. If this calculator helped you, a small donation would mean the world to me and help keep this site running. Thank you for your kindness!

Related Calculators

You might also find these calculators useful

File Size Calculator

Convert bytes, KB, MB, GB, TB and PB exactly

Data Storage Converter

Convert between bytes, KB, MB, GB, TB, PB

Compression Ratio Calculator

Calculate data compression ratio, space savings, and efficiency

Bundle Size Calculator

Analyze JavaScript bundle sizes, download times, and performance impact

Measure a JSON payload, then find out whether it fits

Paste JSON and get its exact size in bytes, kilobytes and megabytes, the minified size, and the real gzip size measured by your own browser rather than estimated. Then see the part most tools leave out: whether that payload clears the ceilings it will actually meet in production — a DynamoDB item, a Lambda invocation, an SQS message, an HTTP cookie. Everything runs locally, so production data never leaves the page.

What JSON size actually means

A JSON document's size is the number of bytes its text occupies once encoded, almost always as UTF-8. That is not the same as its character count: an accented letter costs two bytes, a currency symbol three, an emoji four. It is also not the same as the size of the objects your program builds after parsing, which is usually far larger. When a platform quotes a limit, it means encoded bytes.

Size in bytes

How to use it

1

2

3

4

5

When this is useful

Sizing an API response

Confirm a paginated response stays comfortably inside your gateway's payload limit before you raise the page size.

Fitting a database record

Check a document against a DynamoDB item or Firestore document ceiling before a bulk import fails partway through.

Trimming a cookie or token

Cookies are capped at 4096 bytes. Measure claims before they silently stop being sent.

Cutting bandwidth cost

See how much gzip actually saves on your real payloads, and which keys to shorten for the biggest win.

Choosing a queue message shape

Verify a message body fits SQS or Pub/Sub before you design around a limit you have misremembered.

Why measure it

Limits are enforced on raw bytes

A DynamoDB item is capped at 400 KB and an HTTP cookie at 4096 bytes. Neither cares that your payload compresses well, because the limit applies before any compression.

Bandwidth is billed on compressed bytes

What you pay to move a response is its gzip or brotli size, not its raw size. Those two numbers can differ by more than tenfold on repetitive data.

A few keys usually dominate

Long key names repeated across thousands of array elements, or one oversized description field, typically account for most of a payload. Finding them is faster than guessing.

Estimates are not good enough

Compression depends on repetition and entropy, so no formula based on length or character variety can predict it. Only measuring gives you a number you can plan against.

Frequently asked questions

Before. Every limit checked here — DynamoDB items, Lambda invocation payloads, SQS and Pub/Sub messages, Firestore documents, HTTP cookies — is measured on the uncompressed bytes. Compressing a 500 KB item does not make it fit a 400 KB ceiling. Compression only reduces what you pay to transmit a response, which is why this page reports the two numbers separately and checks the limits against the uncompressed size.

Not any more. Amazon's own SQS quota documentation states the maximum message size is 1,048,576 bytes, which is 1 MiB. The 256 KB figure was the older limit and it is still widely repeated in blog posts, tutorials and other calculators. This page uses the current documented value.

AWS documents 6 MB for each of the request and response on a synchronous invocation, 1 MB for an asynchronous invocation, and 200 MB for a streamed response. The asynchronous figure is often quoted as 256 KB, which is out of date.

Gzip output depends on the compressor, its compression level, and its window and dictionary settings, so two implementations can differ by a few percent on the same input. Much larger differences usually mean the other tool is estimating rather than compressing. This page runs your browser's own gzip and reports the byte count it produces.

Gzip adds a header and a checksum, roughly eighteen bytes before any data, and very short inputs offer little repetition to exploit. Below about a hundred bytes the overhead outweighs the saving, so the compressed output is larger than the input. That is normal, and it is why small responses are often sent uncompressed.

Bytes are what limits and bandwidth are measured in. Characters are what a person counts. In UTF-8 an ASCII character is one byte, an accented Latin letter is two, most symbols are three, and an emoji is four. This page shows both, plus the UTF-16 code unit count that JavaScript's string length property returns, which counts an emoji as two.

Cloud vendors generally state quotas in binary multiples while writing the decimal abbreviation. AWS makes this explicit in its DynamoDB documentation, which says 1 KB means 1024 bytes. This page compares against limits on that binary basis and shows each vendor's own wording alongside the figure.

Yes, and it is usually the easiest win available. Removing indentation and newlines does not change your data at all, and on a pretty-printed payload it commonly cuts twenty to thirty percent. Because limits are enforced on the bytes you actually send, the minified size is the number worth optimising.

The ones that repeat. A key name costs its own bytes on every single occurrence, so a fifteen-character name inside a ten-thousand-element array costs well over a hundred and fifty kilobytes in names alone. The breakdown on this page ranks key names by total attributable bytes so the repeated offenders surface first.

Not currently. Browsers expose gzip and deflate for compression but not brotli, so measuring brotli would mean loading a sizeable WebAssembly module. Since gzip is the conservative figure and brotli cannot change any limit verdict, this page measures gzip exactly rather than shipping extra weight for a number that would only look better.

No. Parsing, byte counting and gzip compression all happen in your browser, and the payload is never sent to a server. That matters because the natural thing to paste into a tool like this is a real production response.

A file can carry a byte order mark, a trailing newline, or Windows line endings that use two bytes per break instead of one. Each shifts the byte count slightly without changing the data. This page measures exactly the text you paste, so pasting from an editor that trims or normalises whitespace will give a slightly different figure than the file itself.

CalculateYogi

The most comprehensive calculator web app. Free, fast, and accurate calculators for everyone.

Calculator Categories

  • Math
  • Finance
  • Health
  • Conversion
  • Date & Time
  • Statistics
  • Science
  • Engineering
  • Business
  • Everyday
  • Construction
  • Education
  • Technology
  • Food & Cooking
  • Sports
  • Climate & Environment
  • Agriculture & Ecology
  • Social Media
  • Other

Company

  • About
  • Contact
  • Contributors

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy

© 2026 CalculateYogi. All rights reserved.

Sitemap

Made with by the AppsYogi team