Text Size Calculator
Measure text size in bytes (UTF-8), kilobytes, and megabytes. See how each character contributes to total size, and how ASCII, multi-byte Latin, CJK, and emoji break down. Useful for database limits, API payloads, SMS message length, and storage planning.
Per-character byte table
Every distinct character in your text with its code point, its UTF-8 bytes, how many times it appears, and the bytes it adds up to. Sorted by total bytes, largest first.
| Character | Code point | UTF-8 bytes | UTF-8 hex | Count | Total bytes |
|---|
How to use the text size calculator
1. Paste your text
Drop any string into the input box: an email draft, a JSON payload, a JavaScript code snippet, a CSV row, a CJK or emoji-heavy comment. The byte counter updates on every keystroke.
2. Read the headline number
The red total at the top of the sidebar shows total UTF-8 byte size. Below it sit KB, MB, character count, and word count. Use bytes for storage / network / API payload checks; use characters for SMS, tweet, and UI-display limits.
3. Check the byte-class breakdown
UTF-8 encodes each character as 1, 2, 3, or 4 bytes depending on the codepoint. ASCII (0x00-0x7F) uses 1 byte. Latin-extended, Greek, Cyrillic, Hebrew and Arabic (0x80-0x7FF) use 2. CJK and most BMP (0x800-0xFFFF) uses 3. Emoji and supplementary-plane characters use 4. The breakdown shows how many characters and how many bytes fall in each class. Useful for figuring out why a "100-char" string is actually 200 bytes.
4. Compare against common limits
The bottom card flags whether your text fits inside SMS (160 characters, or 70 when the text has any character outside the GSM-7 alphabet), tweet (280 chars), or MySQL VARCHAR(255) (255 characters) limits. Green means OK; red means over.
5. Open the extra panels when you need them
"Other encodings and size budget" shows the same text as UTF-16, UTF-32, a JSON string, Base64 and URL-encoded bytes. Pick a size budget (4 KB to 16 MB, or your own number of bytes) and the encoding to measure, and the panel shows how many bytes are left or how far over you are. "Per-character byte table" lists every distinct character with its code point, UTF-8 bytes and count, and Download CSV saves the table.
When you need to measure text size
Database column limits
In MySQL, the N in VARCHAR(N) is the maximum number of characters, not bytes, so a VARCHAR(255) column holds 255 characters. Bytes still matter: the whole row is capped at 65,535 bytes shared by all columns, and a character can take up to 4 bytes in utf8mb4, so a string of 100 emoji is 100 characters but 400 bytes. Use this tool to check both numbers before INSERT. See also: tweet character count. See also: Instagram character limit.
API payload sizing
REST APIs and Pub/Sub systems often have per-message byte limits (Kafka default 1 MB, AWS SQS 256 KB). Run sample payloads through the tool to estimate worst-case sizes.
SMS / iMessage limits
SMS messages over 160 characters split into multi-part messages, each metered separately. iMessage doesn't have this limit, but if your message will fall back to SMS (recipient on Android), the 160-char limit applies. Check before sending bulk messages.
Tweet character counting (vs byte counting)
Twitter/X counts characters (with some weighting for emoji and URLs). The 280-char limit is a character count, not a byte count. Use the character total from this tool, not the byte total, for tweet drafts.
Email subject line bytes
Email subject lines render variably across clients (Gmail truncates around 70 chars, Outlook around 60). Length matters for display, but some clients also impose byte limits in headers. Sample your subject line here.
Compression and storage estimation
Before compressing a corpus, knowing UTF-8 byte size is the baseline. A 1 MB English corpus is roughly 1M ASCII characters. A 1 MB Chinese corpus is roughly 350K CJK characters (3 bytes each). Tools like gzip reduce typical text by 60-80%.
UTF-8 encoding in one paragraph
UTF-8 is a variable-length encoding for Unicode characters. The 128 ASCII characters (English letters, digits, common punctuation) take 1 byte each. The next 1,920 codepoints (Latin diacritics like é, ñ, ü, plus extended Latin, Greek, Cyrillic, Hebrew, Arabic) take 2 bytes each. The next 63,488 codepoints (most of the Basic Multilingual Plane, including all CJK ideographs and Korean Hangul) take 3 bytes each. Everything else (emoji, mathematical symbols, supplementary plane scripts like Cuneiform) takes 4 bytes. See also: character frequency.
That means a 100-character English string is 100 bytes; a 100-character French string with one é per word is around 120 bytes; a 100-character Chinese string is 300 bytes; a 100-emoji string is 400 bytes.
Byte costs of common text content
| Content | Approx bytes/char | Example (1KB fits) |
|---|---|---|
| English prose | 1.02 (with occasional curly quotes) | ~1000 chars |
| JSON with English values | 1.0 | ~1000 chars |
| French prose | 1.05 to 1.10 | ~950 chars |
| German prose | 1.03 to 1.06 | ~970 chars |
| Spanish prose | 1.04 | ~975 chars |
| Arabic prose | ~2.0 | ~500 chars |
| Chinese / Japanese prose | ~3.0 | ~340 chars |
| Emoji-heavy chat | ~4.0 | ~250 chars |
Related tools
Frequently asked questions
What is UTF-8 byte size?
UTF-8 is the standard encoding for storing and transmitting text. Each character takes 1, 2, 3, or 4 bytes depending on its Unicode codepoint. ASCII characters use 1 byte; Latin diacritics use 2; CJK characters use 3; emoji use 4.
Why is my 100-character string showing as 400 bytes?
Probably emoji. Each emoji takes 4 bytes in UTF-8 (some take 8 or more because they're combined sequences with skin-tone modifiers or zero-width joiners). A string of 100 emoji is 400+ bytes.
Is byte count the same as character count?
Only for pure ASCII text. As soon as you include any non-ASCII character (any accented letter, any emoji, any CJK character), the byte count exceeds the character count. The breakdown in the sidebar shows the split. The tool counts characters as Unicode code points, so an emoji built from several code points (a flag, a skin-tone emoji, a family emoji) counts as several characters.
Does MySQL VARCHAR(255) count characters or bytes?
Characters. In MySQL, the N in VARCHAR(N) is the maximum number of characters the column stores, so the tool compares your character count with 255. The byte size still matters for storage: the whole row is limited to 65,535 bytes shared by all columns, and with utf8mb4 one character can take up to 4 bytes. Other databases can differ, so check the rule for yours.
Can the tool handle non-Latin scripts?
Yes - the calculator works on any Unicode text. CJK, Arabic, Hebrew, Greek, Cyrillic, Hindi, Thai, and emoji all encode correctly. The byte-class breakdown shows which class each character falls into.
What's the difference between UTF-8 and UTF-16?
UTF-8 is the dominant encoding on the web and in files; ASCII is a 1-byte subset. UTF-16 (used internally by JavaScript and Windows) uses 2 or 4 bytes per character - different byte cost. The headline number is UTF-8; open "Other encodings and size budget" to see the UTF-16 and UTF-32 sizes of the same text.
Is the calculation done in my browser?
Yes. The byte count is calculated in your browser by JavaScript, from each character's Unicode code point. Nothing is sent to a server.
Does the tool include BOM (byte order mark)?
No. The text-size calculator measures the bytes of your text content without any encoding declaration bytes. If you save the text to a UTF-8 file with BOM, add 3 bytes for the BOM. See also: all utilities.
More wordcounter.ai tools
Other tools you might find useful.