How to use this tool
- Enter text.
- Select Update result to view the result.
- Check the method and assumptions below before using the result.
Input reference and sample values
Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.
| Input | Format and units | Sample |
|---|---|---|
| Text | Keep the structure and separators shown in the sample. Line breaks are retained in this input. | Hello π |
Result for these sample inputs
10 bytes
- KiB (1,024 bytes)
- 0.009765625
- kB (1,000 bytes)
- 0.01
Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.
The method, explained
Encode the text with TextEncoder and count the resulting bytes. Divide by 1,024 for KiB and by 1,000 for kB.
Hello uses 5 UTF-8 bytes. The globe emoji π uses 4 bytes, so Hello π uses 10 bytes including the space.
What to keep in mind
Byte length differs from character count and compressed transfer size. No byte-order mark is included. Browser-normalized line endings may differ from an original file.
Common questions
Does this predict gzip download size?
No. Compression depends on the complete content and compression settings. This measures uncompressed UTF-8 bytes.
Is my content uploaded?
No. This tool processes the text in your browser. Copy only the result you intend to share.
Methodology maintained by ClarityKit. How these tools are built and checked.