Byte Size Calculator
Paste text or choose a file to compare its browser-local size. Text reports UTF-8 bytes distinctly from JavaScript UTF-16 code units.
Paste text or choose a local file.
A QUICK WALKTHROUGH
How to use this tool
- Paste text or select one local file.
- Review UTF-8 bytes, UTF-16 code units, decimal units, and binary units.
- Use the figures to estimate storage or transfer size; nothing is uploaded.
Two text measurements
UTF-8 byte count measures the encoded text bytes. UTF-16 code units count JavaScript string units, so a supplementary Unicode character may use two code units.
Decimal and binary units
Decimal units use kB, MB, and GB based on powers of 1,000. Binary units use KiB, MiB, and GiB based on powers of 1,024.
Local and bounded
Pasted text is limited to 1 MB of UTF-16 code units and selected files to 50 MB. The file is measured locally and never uploaded or read as content.
GOOD TO KNOW
Common questions
Are UTF-8 bytes the same as JavaScript length?
No. JavaScript length counts UTF-16 code units; UTF-8 byte size depends on the characters.
Is the file uploaded?
No. The browser reads only the selected file metadata for its local size.
What are decimal and binary units?
kB/MB/GB use powers of 1,000; KiB/MiB/GiB use powers of 1,024.