File Size Calculator
File Size Calculator lists every selected file with its exact File.size byte count and approximations obtained by dividing by 1,024 and 1,048,576. The labels say KB and MB, although those binary divisors correspond more precisely to KiB and MiB. It reports file length only; it does not estimate transfer overhead, storage allocation, compressed size, media duration, or folder totals unavailable to the browser.
Runs locally — files stay on your deviceAre the displayed KB and MB decimal units?
No. This page divides by powers of 1,024, despite using the shorter KB and MB labels.
Logical file length is not every kind of size
File.size is the number of bytes exposed for the selected file. Filesystem allocation and protocol overhead can produce different storage or transfer figures.
How it works
For each selected File object, the page prints its name, localized integer bytes, bytes divided by 1,024 to two decimals, and bytes divided by 1,048,576 to two decimals.
Key concepts
Bytes are exact
The integer byte value is the authoritative number shown here.
Rounded units are approximate
Two-decimal output can hide small differences.
When to use it
- Check files against an upload byte limit.
- Compare logical lengths of several local files.
- Convert a byte count into a readable approximation.
When not to use it
- Do not use it for disk-space allocation.
- Do not infer image, audio, or video quality from size alone.
- Do not expect recursive folder measurement.
Worked examples
One MiB
- Input
1,048,576 bytes- Expected output
1024.00 KB · 1.00 MB
Binary divisors are used.
Upload boundary
- Input
5,000,001 bytes- Expected output
Exact byte count
Use bytes when a service states an exact maximum.
Several files
- Input
Three selections- Expected output
Three lines
No combined total is calculated.
Common mistakes
Reading MB as decimal
The displayed calculation uses 1,048,576. Correction: Use exact bytes or interpret it as MiB.
Expecting a total
Only per-file lines are shown. Correction: Add exact byte values separately.
Equating size with disk usage
Allocation units and metadata are excluded. Correction: Use operating-system storage tools.
Best practices
- Use exact bytes for hard limits.
- State which unit convention a destination expects.
- Measure the final file that will actually be uploaded.
Related operations and differences
Add Prefix to Filenames
Choose Add Prefix to Filenames when you need to add a prefix to selected filenames.; use File Size Calculator specifically for size.
Add Suffix to Filenames
Choose Add Suffix to Filenames when you need to add a suffix before every extension.; use File Size Calculator specifically for size.
Compare Two Files
Choose Compare Two Files when you need to compare two files securely by SHA-256.; use File Size Calculator specifically for size.
File Checksum Comparator
Choose File Checksum Comparator when you need to compare a file digest with an expected checksum.; use File Size Calculator specifically for size.
File Hash Calculator
Choose File Hash Calculator when you need to calculate a local cryptographic file digest.; use File Size Calculator specifically for size.
File to Base64
Choose File to Base64 when you need to encode a local file as Base64.; use File Size Calculator specifically for size.
Limitations and privacy
- No aggregate total, folder traversal, allocated size, transfer overhead, or compression forecast.
- Readable figures are rounded to two decimals.
- Names and sizes come from browser File objects.
Processing happens in this browser. Selected file contents are not uploaded by this tool.
Downloads and copied results remain on this device; handle them according to their sensitivity.
Frequently asked questions
Does it upload files?
No.
Are folders totaled?
No.
Is the byte count exact?
It is the exact File.size value exposed by the browser.
Why can another app show a different MB value?
It may use decimal units, allocation size, or different rounding.