Byte Length Counter by Encoding
Measure how many bytes your text becomes in UTF-8, Shift_JIS, EUC-JP, UTF-16, and JIS (ISO-2022-JP). Useful for checking database column limits and legacy form input caps.
Tips
- In UTF-8, half-width alphanumeric characters take 1 byte each, while Japanese characters (hiragana, katakana, kanji) usually take 3 bytes each, so the same character count can mean very different byte counts between English and Japanese text.
- Older systems that enforce byte-based limits on columns like VARCHAR(255) will hit their cap much faster with Japanese text than with English text of the same character length.
- Most emoji are represented by a surrogate pair of two code units, taking 4 bytes in both UTF-8 and UTF-16, which is why social media character counters sometimes hit their limit sooner than expected.
- If you already know a byte count and want to convert it to KB, MB, and other units, use our sister tool "Byte Unit Converter" instead — it handles the reverse calculation of byte count to other units.
Frequently Asked Questions
Side Note — The hidden relationship between social media character limits and byte counts
Older versions of MySQL's "utf8" character set had a surprising limitation: it could not actually store Unicode emoji (supplementary characters beyond U+10000). UTF-8 itself is a variable-length encoding that supports up to 4 bytes per character, but MySQL's "utf8" was historically capped at 3 bytes per character, causing INSERT errors whenever text containing emoji was saved. Migrating to "utf8mb4", which correctly supports the full 4-byte range, is now the recommended fix — a well-known example of why understanding the relationship between character encoding and byte count actually matters in practice.
Back when Twitter (now X) enforced its famous 140-character limit, there was a long-running debate about fairness between languages: Japanese users could express a fairly complete thought in 140 characters, while English users could barely fit 20-30 words in the same limit. This is because a single Japanese kanji character can carry far more information than a single English letter. Twitter eventually introduced a weighted counting system where languages like Japanese counted as "1 character = 1 count" while others counted "2 bytes = 1 count" for certain characters, in an attempt to balance the playing field across languages.
Mobile SMS has a similar quirk. A standard GSM-encoded SMS allows up to 160 characters per message, but the moment it includes even a single character outside the 7-bit GSM character set — such as an emoji or a Japanese character — the encoding switches to UCS-2 (roughly equivalent to UTF-16), and the limit drops sharply to just 70 characters. The fact that using a single Japanese character can cut your available message length in more than half is a perfect real-world illustration of the exact relationship between character encoding and byte count that this tool is built to measure.