How to Use the Text Length and UTF-8 Byte Counter
- 1Paste the exact string, including any spaces, punctuation, or line breaks that should be measured.
- 2Read Characters for the code point count and Bytes (UTF-8) for the encoded size.
- 3Check Lines and Words for the other reported measures of the same input.
- 4Compare the matching unit with the limit used by your destination before copying the result.
Input & Output Examples
The emoji adds one code point and four bytes. The newline adds a byte and a line, and the word matches are A and 2.
Input Sample
A🙂
2Expected Output
Characters: 4
Bytes (UTF-8): 7 B
Lines: 2
Words: 2The accent is a separate combining code point, so the displayed letter and punctuation occupy three code points total.
Input Sample
é!Expected Output
Characters: 3
Bytes (UTF-8): 4 B
Lines: 1
Words: 1Practical Developer Workflows
- Check whether a label containing emoji fits a UTF-8 byte limit.
- Compare plain ASCII and accented sample strings that appear to have similar lengths.
- Measure the code point and byte totals of a fixture before testing a text storage boundary.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Notice a bug, calculation error, or outdated info?
Let us know directly so our engineering team can fix it.
Frequently Asked Questions
UTF-8 assigns one byte to each ASCII code point and multiple bytes to many other code points. A single accented letter or emoji may therefore add more bytes than characters. Use the byte count for limits specified in UTF-8.