String Length Counter — Free Online Character & Byte Counter
Count characters, bytes, words, lines, and Unicode code points — with platform-specific length limits.
Frequently Asked Questions
String Length: Characters, Bytes, and Unicode Complexity
Measuring string length seems simple but has important nuances across programming languages and storage systems. JavaScript's string.length counts UTF-16 code units, not visible characters — emoji like 😀 are 2 code units (a surrogate pair) but appear as 1 character. Python 3 counts Unicode code points. Go counts bytes.
UTF-8 byte count is critical for database column sizing, HTTP headers, cookie limits, and any system that stores strings as bytes. ASCII characters are 1 byte in UTF-8, but common extended characters (accents, cyrillic, arabic) use 2-3 bytes, and emoji use 4 bytes. A VARCHAR(100) stores different amounts of data depending on the character set.
For SEO: Google truncates title tags around 60 characters and meta descriptions around 155 characters. For social media: Twitter/X allows 280 characters. For SMS: 160 characters for GSM-7 encoding, only 70 for unicode messages. This tool shows all these metrics simultaneously with platform limit indicators.