Byte Counter

Calculate the byte length of text when stored as UTF-8.

Category: Text Tools

When to use?

Use it before saving to a byte-limited DB column like MySQL VARCHAR(255), or to gauge an HTTP request body size. Korean text has different character and byte counts, so check separately.

How to use

  • Type or paste the text to check.
  • The UTF-8 byte count updates in real time.
  • Compare against your byte limit to check for overflow.

Input Explanation

Enter any text — Korean, English, numbers, symbols, emoji. Calculation is based on UTF-8 encoding.

Calculation Basis

In UTF-8, letters/numbers are 1 byte, Korean is typically 3 bytes, and emoji usually 4 bytes. Character count and byte count can differ.

Usage Examples

  • Validate DB column capacity - Check for overflow before saving to a byte-limited column like VARCHAR(255).
  • Check API payload size - Gauge the real size of an HTTP request body in advance.
  • Check filename bytes - Check whether a filename with Korean exceeds a system limit.

Examples

  • "Hello" (5 chars) → 5 bytes
  • A 5-character Korean word → 15 bytes (1 Korean char = 3 bytes)

Cautions

  • In MySQL VARCHAR(n), n is a character count, not bytes. Check the column setting for the real byte limit.
  • Results may differ from other tools depending on line-break handling and Unicode (UTF-8) splitting.

Guides

UTF-8 byte basis

In UTF-8, Korean is usually 3 bytes per character and English/numbers are 1 byte. Emoji and special characters can use more bytes.

Check DB and API limits

DB columns and API request sizes are often byte-based, not character-based. Check the actual byte count before saving.

FAQ

How many bytes is Korean?

In UTF-8, most Korean characters are 3 bytes each.

Are other encodings besides UTF-8 supported?

It currently calculates only on a UTF-8 basis.

How many bytes is an emoji?

In UTF-8, most emoji are stored as 4 bytes.

Why do character and byte counts differ?

Character count is the number of characters; byte count is the actual storage size.

Related Tools

  • Character Counter - Count characters with and without spaces, and line count, in real time.
  • Word Counter - Calculate word count, unique word count, and sentence count of text.
  • Line Counter - Count total lines, empty lines, content lines, and the longest line length.
  • JSON Formatter - Beautify or minify JSON strings instantly and check for validity errors.
  • Case Converter - Convert text, variable names, and filenames to UPPER, camelCase, snake_case, kebab-case, and more.
  • Whitespace Remover - Remove whitespace in various ways — leading/trailing, duplicate, or per-line.