Example 1
- 100 B
- mode bytes
136 B
What Base64 size from 100 B in bytes mode? 136 B. A length estimate, not an encode.
Type bytes and a mode. 100 B become 136 B. 1024 B become 1368 B. 50 B become 68 B. A length estimate, not a file encode.
A length estimate, not an encode. JWT tokens live on JWT token size.
Enter data and click Calculate.
Base64 size in this calculator estimates length from the bytes you type. 100 B become 136 B. 1024 B become 1368 B. 50 B become 68 B. In bytes mode the formula is ceil(n/3) × 4. The calculator does not encode a payload and does not paste a file.
Field b64-bytes is a number. Select b64-mode stays bytes in the examples. 100 / 3 is 34 groups, times 4 is 136. 1024 is 1368. 50 is 68. Encoded mode runs the other way and is not in these three cards.
136 B is not a file after btoa. 1368 B does not come from an encoder. 68 B is not a string from disk. You type the length. The calculator does not read MIME and does not add a data URI.
JWT token size next door estimates token characters. JSON size multiplies characters by bytes. Here 100 B stays 136 B, the 4-on-3 overhead alone.
Type 100, leave bytes mode, then Calculate. A comma is not needed, because the field is an integer. Zero bytes leave 0 B. This is not an encode in the browser.
100 B become 136 B. 1024 B become 1368 B. 50 B become 68 B. Another mode at 100 changes the calculator; the examples keep bytes.
in bytes mode: ceil(n/3) × 4. A length estimate, no payload encoding.
A length estimate in bytes mode. 100 B become 136 B. The calculator does not encode a payload.
136 B
What Base64 size from 100 B in bytes mode? 136 B. A length estimate, not an encode.
1368 B
What about 1024 B in bytes mode? 1368 B.
68 B
What about 50 B in bytes mode? 68 B.
136 B. ceil(100/3) × 4. A length estimate.
1368 B. The same bytes mode.
68 B. A small block, a higher padding share.
No. No btoa and no pasted payload. Length only.
bytes goes from bytes to Base64. encoded goes the other way. The examples keep bytes.
The calculator shows 136 B as the encoded length. Not a file after a disk write.
Yes as 0 B. A blank field is a number error.
On JWT token size. Here the 4-on-3 overhead stays.
No. Base64 grows. Gzip is a separate step, not on this calculator.
The calculator counts bits, bytes or throughput from your numbers. Below are SI and bit definitions (NIST).
Page updated in 2026.
Base64 turns bytes into ASCII-safe text for JSON, XML, email, and data-URIs. It is transport encoding, not compression — the encoded string is usually larger than the original bytes.
This calculator answers: “how many characters will N bytes become?” and “how many bytes sit behind a string of length M?” (the second mode is a lower bound without padding knowledge).
= padding so the string length is a multiple of 4.Larger blocks typically grow by about +33%. Tiny payloads look worse percentage-wise because of padding (e.g. 1 B → 4 chars).
Canonical 4:3 pattern — enter the left column in binary-size mode.
| Raw bytes | Base64 chars | Overhead | Note |
|---|---|---|---|
| 3 | 4 | +33% | exact one triplet |
| 1 | 4 | +300% | padding dominates |
| 1024 (1 KiB) | 1368 | +33.6% | typical blob |
| 204800 (200 KB) | 273068 | +33.3% | image in JSON |
The calculator uses ceil(n/3)×4 — no MIME line wrapping.
the integer part of (len×3/4); lower bound without padding.content, file, attachments).data:…;base64, prefix) — prefer file URLs for big assets.