File Size Formatter API

GET

Give users clear file sizes instead of raw byte counts.

File Size Formatter converts raw byte counts into human-readable file size strings. Send a byte count with optional precision and unit settings to receive formatted labels, unit names, and scaled numeric values.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/filesizeformatter?bytes=1073741824
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "bytes": 1073741824,
    "formatted": "1 GiB",
    "value": 1,
    "unit": "GiB",
    "standard": "binary",
    "precision": 2,
    "conversions": {
      "B": 1073741824,
      "KiB": 1048576,
      "MiB": 1024,
      "GiB": 1,
      "TiB": 0,
      "PiB": 0,
      "EiB": 0,
      "ZiB": 0,
      "YiB": 0
    }
  }
}

About the File Size Formatter API

File Size Formatter works by dividing byte values by the appropriate divisor (1024 for binary, 1000 for decimal) to calculate sizes in various units. Automatically selects the most appropriate unit or allows manual specification.

What people use it for

File Management
Display file sizes in user-friendly formats in file managers and storage applications
Storage Analytics
Format storage usage data in dashboards and analytics reports
Data Transfer
Show download and upload sizes in appropriate units during file transfers
API Responses
Convert byte sizes to readable formats in API responses and data exports

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use File Size Formatter

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the File Size Formatter API.

Read the docs →
Does it support both 1024-based binary and 1000-based decimal standards?
Yes, it supports binary calculations based on 1024 multipliers like KiB, MiB, and GiB as well as decimal standards based on 1000 multipliers like KB, MB, and GB. You can specify your preferred standard on each request.
Can I choose the target unit or customize the decimal places?
Yes, you can specify an exact target unit or omit it to let the system automatically select the cleanest unit. You can also configure precision between 0 and 10 decimal places to control rounding.
What size range does File Size Formatter support?
The API handles values starting from single bytes all the way up through yobibytes. It supports byte, kibibyte, mebibyte, gibibyte, tebibyte, pebibyte, exbibyte, zebibyte, and yobibyte tiers.
Is the multi-unit conversion table included on the Free plan?
No, the full conversions breakdown across all units is a premium feature. The Free plan returns the primary formatted string and unit value, while any paid plan unlocks the complete conversion table spanning bytes to yobibytes.
How far does the Starter plan go for file size conversions?
The Starter plan covers 100,000 conversions each month. Because each request uses 2 credits, calls work out to about $0.0003 each, or $0.30 per 1,000 calls. You can also test with 100 calls per month on the Free plan.

Ready to build with File Size Formatter? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs