Loading...
Loading...
We use cookies to enhance your experience, analyze site usage, and serve personalized content. By clicking "Accept All," you consent to our use of cookies. See our Cookie Policy and Privacy Policy for details.
Calculate string length in bytes, characters, and code points
Surrogate Pairs Detected (1)
ASCII Codes
Hex Bytes
Binary
Code Points
String length calculator displaying three measurements: code points (Unicode characters), UTF-16 code units (JavaScript string length), and UTF-8 bytes (storage size). Breaks down character types into letters, digits, spaces, punctuation, and emoji with counts and percentages. Includes limit checks for SMS (160/70 GSM), Twitter (280), Instagram caption (2200), and Facebook post (63206).
String length semantics vary across contexts — JavaScript uses UTF-16, databases use UTF-8, SMS uses GSM-7. This tool surfaces all relevant measurements simultaneously and alerts users when they exceed platform limits.
Frontend developers, content creators, SMS/messaging engineers, and anyone building character-limited UIs or validating input field constraints.
Type or paste text into the input area; all measurements update in real time.
Read the three measurement lines: code points (Unicode), UTF-16 units (JS length), UTF-8 bytes.
Review the character type breakdown section showing counts and percentages for letters, digits, spaces, punctuation, and emoji.
Check the limit bars — SMS, Twitter, Instagram, Facebook — which turn red when the text exceeds the platform limit.
Hover over any emoji character to see its Unicode code point and name.
Use the clear button to reset the input and all measurements.
Input: "Hello, world! 😊" → code points: 15, UTF-16: 16 (😊 is surrogate pair), UTF-8: 19 bytes; char breakdown shows 11 letters, 1 digit, 2 punctuation, 1 space, 1 emojiInput: "a" repeated 161 times → code points/UTF-16/UTF-8 all 161; SMS limit: 160 limit exceeded (1 char over 7-bit GSM limit)2 UTF-16 code units for 1 code point.
ASCII is 1 byte, extended Latin 2 bytes, CJK 3 bytes, emoji up to 4 bytes.
tabs, newlines, and other control characters are included in all measurements and listed under the "other" category.
Count words, characters, sentences, and analyze text readability with Flesch scores
Test and debug regular expressions with real-time matching, capture groups, and extended flags
Live preview and edit Markdown with syntax highlighting
Calculate subnet masks, CIDR notation, and IP ranges
Dive deeper with our comprehensive guides and tutorials.