Data rate convert
data-rate-convert · version 1.0.0 · Other utilities · free, no key needed
Convert bit or byte rates across SI and IEC prefixes and return an exact reduced rational.
Use when you need to: convert Mbps to MB per second · convert bit rate to byte rate · change SI data rate units.
Decide before calling
Read the versioned contract and the supported scope below. Reuse data-rate-convert@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 data-rate-convert@1.0.0 for convert Mbps to MB per second. 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
- convert Mbps to MB per second
- convert bit rate to byte rate
- change SI data rate units
- convert MiBps to Mbps
- exact bandwidth unit conversion
- turn Gbps into GiBps
Not supported
- estimate download duration
- format storage byte counts
Behavior
- Lowercase b denotes bits and uppercase B denotes bytes; one byte is exactly eight bits.
- SI prefixes are powers of 1000 and IEC prefixes Ki, Mi and Gi are powers of 1024.
- The result is a reduced non-negative rational numerator/denominator in to_unit; no rounding or binary floating point is used.
Input
value(string, required): min length 1; max length 128; pattern^(0|[1-9][0-9]*)(?:\.[0-9]+)?$from_unit(one of "bps", "Bps", "kbps", "kBps", "Mbps", "MBps", "Gbps", "GBps", "Kibps", "KiBps", "Mibps", "MiBps", "Gibps", "GiBps", required)to_unit(one of "bps", "Bps", "kbps", "kBps", "Mbps", "MBps", "Gbps", "GBps", "Kibps", "KiBps", "Mibps", "MiBps", "Gibps", "GiBps", required)
Output
numerator(string, required): pattern^(0|[1-9][0-9]*)$denominator(string, required): pattern^[1-9][0-9]*$unit(one of "bps", "Bps", "kbps", "kBps", "Mbps", "MBps", "Gbps", "GBps", "Kibps", "KiBps", "Mibps", "MiBps", "Gibps", "GiBps", required)standard_version(constant "IEC 80000-13:2008; SI Brochure, 9th edition (2019, updated 2022)", required)
Limits
- max input bytes: 128
- max digits: 40
- max output bytes: 512
- max iterations: 512
Example
Request input:
{
"value": "8",
"from_unit": "Mbps",
"to_unit": "MBps"
}
Response:
{
"result": {
"numerator": "1",
"denominator": "1",
"unit": "MBps",
"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": "data-rate-convert",
"version": "1.0.0",
"input": {
"value": "8",
"from_unit": "Mbps",
"to_unit": "MBps"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/data-rate-convert/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"value":"8","from_unit":"Mbps","to_unit":"MBps"}'
The machine-readable contract is at /v1/tools/data-rate-convert/versions/1.0.0.
CLI
node cli.mjs run data-rate-convert 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Bytes parse human: Parse an SI or IEC byte-size string and return an exact integer byte count using explicit rounding.
- Bytes format human: Format an exact byte count as both SI and IEC strings and return the rounding mode used.
- Identifier case convert: Convert an ASCII identifier to a requested common case and return the converted identifier.
- Epoch to ISO: Convert an exact integer Unix timestamp in seconds, milliseconds, microseconds or nanoseconds to RFC 3339 UTC.
- Rtf to markdown: Convert an 8 KiB ANSI-1252 RTF text subset to escaped Markdown; unsupported Word features are refused.
- Base64url decode: Decode base64url to UTF-8 text or lowercase hex and return the requested value.