Text Tools

Text Size Calculator

Calculate the exact byte size of any text string in UTF-8, UTF-16, and ASCII encodings. Essential for database VARCHAR field sizing, HTTP Content-Length headers, buffer allocation, and understanding multi-byte character encoding overhead.

Text Size Calculator

Free & no signup required

Results

How to Use This Tool
  1. Paste or type the text you want to measure into the input box
  2. Click "Calculate Size" to compute byte sizes across encodings
  3. Review the byte count in UTF-8 and UTF-16 to plan storage or transmission requirements
What is Text Size Calculator?
The byte size of a text string depends on the character encoding used to represent it. In ASCII, every character is exactly 1 byte, and only 128 characters are supported. In UTF-8 (the dominant encoding of the web), ASCII characters remain 1 byte each, but characters outside the basic ASCII range use 2–4 bytes. Emoji, Chinese, Japanese, Korean, Arabic, and many other characters require 3–4 bytes in UTF-8. In UTF-16 (used internally by JavaScript, Java, and Windows), most characters are 2 bytes, but supplementary characters (including most emoji) require 4 bytes. Understanding encoding byte sizes is critical for database column sizing (MySQL VARCHAR limits are in bytes for utf8mb4), network buffer allocation, and ensuring strings don't exceed API payload limits.
Related Tools