Online Text (String) Size Calculator (In Bytes)
Instantly measure exact string byte size across encodings, API payload formats, storage limits, and individual Unicode characters.
UTF-8 Size (Web Standard)
108 Bytes
108 B • 864 bits
UTF-16 Size (JS / Java)
208 Bytes
104 UTF-16 code units
UTF-32 Size (Fixed 4B)
412 Bytes
103 Unicode code points
Live Gzip Wire Size
—
Type text to compress
Encoded & Character Composition
Developer Quota & Storage Fit (UTF-8)
Per-Character UTF-8 Byte Inspector
Spot 2–4 byte characters, emojis, and hidden zero-width characters (showing first 96 of 103).
Calculate Exact Text & String Byte Size Across UTF-8, UTF-16 & Encodings
Measure exact string size in bytes, bits, KB, and KiB instantly as you type or paste. Compare UTF-8, UTF-16, UTF-32, ASCII, JSON-escaped, URL-encoded, Base64, and live Gzip compressed sizes right inside your browser with zero server uploads.
UTF-8, UTF-16 & UTF-32 Comparison
Inspect how emojis, accented letters, and multilingual text expand across UTF-8, UTF-16 (JavaScript string length), UTF-32, and ASCII encodings.
API, Storage & Encoding Sizes
View exact byte counts for JSON.stringify strings, URL-encoded (percent-encoded) strings, Base64 output, and real browser Gzip compression.
Limit & Quota Budget Meters
Check usage against common developer limits like Browser Cookies (4 KB), MySQL VARCHAR(255), SMS segments, and AWS SQS / DynamoDB items.
Per-Character Byte Inspector
Inspect each Unicode code point (U+XXXX), exact UTF-8 hex byte sequence, and 1–4 byte footprint to spot hidden multi-byte or invisible characters.
How to Use String Size Calculator (Bytes)
- 1Paste or type any string, JSON snippet, code, or text into the input editor — or drop a .txt / .json file.
- 2Review real-time byte sizes across UTF-8, UTF-16, UTF-32, ASCII, Base64, JSON, URL encoding, and Gzip.
- 3Use the Quota & Storage Meters to check whether your payload fits database columns, cookies, or API limits.
- 4Open the Per-Character Byte Inspector to check individual code points and UTF-8 hex bytes.
Popular Use Cases
- ✓Checking JSON API request and response payload byte limits (SQS, DynamoDB, webhooks)
- ✓Debugging database truncation in PostgreSQL, MySQL utf8mb4 columns, and indexed keys
- ✓Measuring browser cookie (4 KB) and localStorage entry footprints accurately
- ✓Spotting zero-width spaces and 4-byte emoji characters before sending SMS or storing data
Frequently Asked Questions — String Size Calculator (Bytes)
Why does UTF-8 byte size differ from JavaScript string length?+
JavaScript's .length counts 16-bit UTF-16 code units, whereas UTF-8 uses 1 byte for ASCII characters and 2 to 4 bytes for accented characters, non-Latin scripts, and emojis.
What is the difference between KB (1,000 B) and KiB (1,024 B)?+
Decimal kilobytes (KB) divide bytes by 1,000 (used by storage and network specs), while binary kibibytes (KiB) divide by 1,024 (used by OS memory reporting). This tool displays both.
How is live Gzip compressed byte size calculated?+
On modern browsers supporting the Compression Streams API, your string's UTF-8 bytes are compressed locally with Gzip in memory so you can compare uncompressed vs. wire size.
Does any pasted string or uploaded file leave my device?+
Never. All encoding checks, hex byte inspection, and compression happen 100% locally inside your browser.

