See the character count, UTF-8 bytes and GBK bytes of your text in real time.
How to count the length of a string
Type or paste the text you want to measure into the box.
Three results update in real time below: the character count, the UTF-8 byte count and the GBK byte count.
To start over, click “Clear”.
FAQ
How are characters counted?
Text is counted by Unicode code point, so each letter, Chinese character or symbol is 1 character, and line breaks and spaces are included. Most emoji count as 1, but emoji built from several code points (such as skin-tone or family sequences) count once per code point.
How are the UTF-8 and GBK byte counts calculated?
The UTF-8 count is the real number of bytes after encoding the text as UTF-8, where a Chinese character usually takes 3 bytes. The GBK count uses a simplified rule: ASCII characters are 1 byte and every other character is counted as 2 bytes. It is handy for estimating database field or API length limits.
Why does a Chinese character take different bytes in UTF-8 and GBK?
Each encoding stores characters differently. A common Chinese character takes 3 bytes in UTF-8 but 2 bytes in GBK, so the UTF-8 count of Chinese text is usually larger.
Is my text uploaded?
No. Counting runs locally in your browser as you type, and the text is never sent to a server.