Text length has more than one unit
Count the bytes
your text becomes.
Check UTF-8 payload size against a byte budget you choose. Keep bytes, UTF-16 units and Unicode scalar values separate, with a paged explanation of the encoded bytes.
1. Enter text and a budget
What does a “character” mean?
A displayed symbol can contain several scalar values, and one scalar can use two UTF-16 units or four UTF-8 bytes. This tool does not count user-perceived characters or grapheme clusters.
See the unit explanation2. Inspect the current payload
UTF-8 payload bytes
- UTF-16 code units
- Unicode scalar values
- Entered byte budget
- Remaining bytes
- Excess bytes
Summary exports contain all current totals and assumptions. They do not include your pasted text or the diagnostic table.
Where the bytes come from
Up to 100 scalar records per page. Offsets start at zero; scalar positions start at one. Controls and selected invisible values display as code-point labels.
| Scalar | UTF-16 offset | Byte offset | Code point | Display | UTF-8 hex | Bytes |
|---|
The same look can have a different byte count
The precomposed letter é uses two UTF-8 bytes. The sequence e plus a combining acute accent uses three. No normalization silently changes one into the other here.
Understand the method and limits or check the original worked examples. File metadata, JSON escaping, HTTP framing, compression and database storage overhead are outside this payload calculation.