String Length Counter — Free Online Character & Byte Counter

Count characters, bytes, words, lines, and Unicode code points — with platform-specific length limits.

100% Client-Side — Your data never leaves your browser
0
Characters (JS)
0
Code Points
0
UTF-8 Bytes
0
No Spaces
0
Words
0
Lines
0
Sentences
0
Paragraphs

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.

Related Tools