Bytes format human

bytes-format-human · version 1.0.0 · Other utilities · free, no key needed

Format an exact byte count as both SI and IEC strings and return the rounding mode used.

Use when you need to: format bytes for humans · show bytes in SI and IEC · convert byte count to MB and MiB.

Decide before calling

Read the versioned contract and the supported scope below. Reuse bytes-format-human@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use bytes-format-human@1.0.0 for format bytes for humans. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "bytes": "1500",
  "precision": 2,
  "rounding": "half_even"
}

Response:

{
  "result": {
    "si": "1.50 kB",
    "iec": "1.46 KiB",
    "rounding": "half_even",
    "standard_version": "IEC 80000-13:2008; SI Brochure, 9th edition (2019, updated 2022)"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "bytes-format-human",
  "version": "1.0.0",
  "input": {
    "bytes": "1500",
    "precision": 2,
    "rounding": "half_even"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/bytes-format-human/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"bytes":"1500","precision":2,"rounding":"half_even"}'

The machine-readable contract is at /v1/tools/bytes-format-human/versions/1.0.0.

CLI

node cli.mjs run bytes-format-human 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.