Text Size Calculator
Stop guessing whether your payload is too large. Paste in your text and see its exact byte size in UTF-8, ASCII, and Unicode โ before it breaks your API, your database, or your email client.
Encoding Breakdown
Character-to-Byte Ratio
Average bytes per character. UTF-8 uses 1-4 bytes per character depending on the character.
How Text Size Calculation Works
This tool calculates the exact byte size of your text using different character encodings. All processing happens in your browser.
ASCII encoding uses 1 byte per character but only supports basic English letters, numbers, and symbols. UTF-8 supports all Unicode characters but uses 1-4 bytes per character depending on the character.
The tool shows the size in bytes, kilobytes (KB), and megabytes (MB) so you can compare against system limits.
Common Text Size Limits
SMS messages: 160 characters (140 bytes for 7-bit encoding, 280 bytes for UTF-16).
Twitter/X posts: 280 characters for standard accounts, but byte limits may apply for certain characters.
Email subject lines: Typically 78 characters recommended, but technically limited by total email size (usually 10-25 MB).
Database VARCHAR fields: Common sizes are VARCHAR(255), VARCHAR(500), VARCHAR(1000). The number is characters, but storage is bytes.
API request bodies: Varies by API. Common limits are 1 MB, 4 MB, or 10 MB for POST request payloads.
HTTP headers: Typically limited to 8 KB total for all headers combined.
Who Uses Text Size Calculation
Developers: Check API payload sizes before sending requests. Ensure database fields can store the text. Debug encoding issues.
Mobile developers: Optimize SMS messages and push notification payloads where byte limits are strict.
Data engineers: Estimate storage requirements for text columns in databases and data warehouses.
Email marketers: Keep email size under limits to avoid deliverability issues and ensure fast loading.
IoT developers: Work with constrained devices where every byte matters for transmission and storage.
Understanding Character Encoding
ASCII: 7-bit encoding (128 characters) or 8-bit extended ASCII (256 characters). Only supports English and some European languages.
UTF-8: Variable-length encoding. ASCII characters use 1 byte. European accented characters use 2 bytes. Asian characters and emojis use 3-4 bytes.
UTF-16: Uses 2 bytes for most common characters, 4 bytes for rare characters. Used internally by JavaScript and Java.
Why encoding matters: "Hello" is 5 bytes in any encoding. "Hello ๐" is 9 bytes in UTF-8 (5 + 4 for emoji) but 7 characters.