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.
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 (0x80-0x7FF) uses 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 chars), tweet (280 chars), or MySQL VARCHAR(255) (255 bytes) limits. Green means OK; red means over.
When you need to measure text size
Database column limits
MySQL VARCHAR is bound in bytes, not characters. A VARCHAR(255) column stores up to 255 bytes. A string of 255 ASCII chars fits; a string of 100 emoji is 400 bytes and overflows. Use this tool to check 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.
Why does the tool say my text fits in MySQL VARCHAR(255) but is 280 characters?
MySQL VARCHAR(N) is bound in bytes by default (technically up to N×4 with utf8mb4 collation, but the column-declaration N is the byte limit in older configs). The tool flags status by bytes. Check your specific column collation for the exact rule.
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. This tool measures UTF-8 specifically.
Is the calculation done in my browser?
Yes. The byte count uses JavaScript's TextEncoder API in your browser. 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.