Skip to content
Convertto

String Byte Size Calculator

Measure text in UTF-8, UTF-16 and UTF-32 bytes, code points and grapheme clusters.

The size of a string depends on the encoding. This tool reports UTF-8, UTF-16 and UTF-32 byte counts alongside JavaScript's string length, the Unicode code point count and the number of grapheme clusters — the last being what a person actually calls a character.

Runs in your browser
Privacy
Runs entirely in your browser — nothing is uploaded
Cost
Free, unlimited, no sign-up

Frequently asked questions

Why is my emoji counted as two characters?

JavaScript measures strings in UTF-16 units, and any character above U+FFFF — which includes almost all emoji — needs two of them. Use the grapheme cluster count for the number a person would give.

Which number does my database column limit use?

Usually UTF-8 bytes. A VARCHAR(255) in MySQL with utf8mb4 holds 255 characters but can consume up to 1,020 bytes, so a byte-limited column fills up sooner than the character count suggests.

How to use the string byte size calculator

  1. 1Enter or paste your text.
  2. 2The result appears immediately — copy or download it.

Embed this tool

Put the working string byte size calculator on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.

Share this tool

Last updated

More text tools