WritingLocal only
String Length & Byte Counter
Measure string length in characters, bytes (UTF-8/UTF-16), code points, URL-encoded size, and SMS segments.
byte counterstring lengthutf-8utf-16sms counter
⌘⇧CCopy output
Your data stays in your browser — nothing is uploaded.
44
Characters
String .length
43
Code Points
Unicode scalar values
57
UTF-8 Bytes
57 B
88
UTF-16 Bytes
88 B
121
URL-Encoded Length
encodeURIComponent
1
SMS Segments
UCS-2 · 44/70 chars
Size Comparison
UTF-857 bytes
UTF-1688 bytes
URL-encoded121 bytes
💡
What is String Length & Byte Counter?
String Length & Byte Counter measures text in multiple dimensions: character count, Unicode code points, byte sizes (UTF-8, UTF-16), URL-encoded length, and SMS segment count. Features a visual bar chart comparing encoding sizes.
🚀
How it Helps
- ✓Know exact byte sizes for database field limits and API payloads.
- ✓Calculate SMS message segments to optimize cost.
- ✓Compare UTF-8 vs UTF-16 encoding sizes for internationalized text.
📖
Usage Guide
- 1Type or paste text into the input area.
- 2All measurements update instantly as you type.
- 3Check the size comparison chart to visualize encoding differences.
Frequently Asked Questions
UTF-8 uses 1-4 bytes per character (1 byte for ASCII), while UTF-16 uses 2 bytes for most characters. Emoji and rare characters use 4 bytes in both.
SMS uses GSM-7 encoding (160 chars/segment) for basic characters and UCS-2 (70 chars/segment) for any message containing emoji, non-Latin characters, or special symbols.
String .length counts 16-bit code units. Some characters (like emoji 🌍) use two code units (a surrogate pair) but are one code point.
