TFT

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.

0
Bytes
0.0000
Kilobytes (KB)
0.000000
Megabytes (MB)
0
Characters

Encoding Breakdown

UTF-80 bytes
ASCII (estimated)0 bytes

Character-to-Byte Ratio

0

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.

Frequently Asked Questions

UTF-8 is a variable-length encoding that uses 1-4 bytes per character. ASCII characters (0-127) use 1 byte, but special characters, emojis, and non-Latin scripts use 2-4 bytes.
Text size matters for API payloads, database field limits, email size limits, SMS messages, and HTTP request bodies where there are strict byte limits.
Yes. All text processing happens in your browser using JavaScript. Your text never leaves your device.
Characters are what you see. Bytes are how computers store them. ASCII characters use 1 byte each. Emojis and special characters can use 3-4 bytes each in UTF-8.
ASCII only supports English characters and uses 1 byte per character. UTF-8 supports all Unicode characters but uses 1-4 bytes depending on the character. UTF-16 uses 2-4 bytes per character.
This tool uses the standard binary definition: 1 KB = 1024 bytes. Some systems use 1 KB = 1000 bytes (decimal), which is technically KiB vs KB.