Estimate Text Payload Size in UTF-8
Measure UTF-8 bytes, Unicode code points and UTF-16 code units before sending or storing text.
Use the limit your system specifies
A field limit might refer to characters, bytes or another unit. Find out which one applies before shortening text. JavaScript string length counts UTF-16 code units, which is different from both UTF-8 byte length and visible character count.
Read kB and KiB correctly
One decimal kilobyte is 1,000 bytes. One kibibyte is 1,024 bytes. Small differences can matter near a strict upload or message limit. This tool labels both units rather than treating them as interchangeable.
Allow for serialization overhead
The result excludes surrounding JSON syntax, field names, escaped characters and protocol headers. Measure the actual serialized payload when an API limits the complete request body. Compression can change transfer size again, so raw text is only one part of the picture.
Check the file that will be sent
An editor may add a byte-order mark or convert line endings when saving. Browser textareas can normalize line endings too. If the exact file size matters, inspect the saved file rather than relying entirely on a pasted-text estimate.
Put it into practice
Digital Storage Converter
Convert bytes, decimal storage units and binary units without confusing GB and GiB.
Developer toolsText to Hex Converter
Encode text as hexadecimal UTF-8 bytes or decode a hex byte sequence back to text.
Developer toolsUnicode Inspector
See code points, UTF-16 length and UTF-8 bytes to investigate invisible characters and text differences.
Developer toolsUTF-8 Byte Size Calculator
Measure UTF-8 bytes, Unicode code points and UTF-16 code units before sending or storing text.
Developer tools