Convert a value between units in the same physical dimension: length, mass, volume, temper
Convert a value between units in the same physical dimension: length, mass, volume, temperature, area, speed, data, energy, pressure, time, angle. Factors are exact SI constants (NIST SP 811) — deterministic, unlike an LLM's guess. Pass ?category=currency to convert ISO 4217 amounts at ECB reference rates instead (informational, not for pricing). Unknown units → 400 with a suggestion.
1000 (raw units)
price
1
calls / 30d
1
unique payers
2026-08-24
updated
Provider
402utils.com · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0xc55A2D530b53CBaD1001e4AfD4720B7E71f9C291",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "1000",
"maxTimeoutSeconds": 60
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"from": "celsius",
"to": "fahrenheit",
"value": 100
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"category": "temperature",
"from": "celsius",
"result": 212,
"to": "fahrenheit",
"value": 100
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"description": "The value plus source and target units. Query ?category=currency switches to FX.",
"properties": {
"from": {
"description": "Source unit (e.g. mile, kg, celsius) or ISO 4217 code for currency.",
"type": "string"
},
"to": {
"description": "Target unit (same dimension as `from`).",
"type": "string"
},
"value": {
"description": "The amount to convert.",
"type": "number"
}
},
"required": [
"value",
"from",
"to"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"category": {
"description": "The detected dimension (or \"currency\").",
"type": "string"
},
"date": {
"description": "Present for currency: the effective ECB business day.",
"type": "string"
},
"from": {
"type": "string"
},
"rate": {
"description": "Present for currency: units of `to` per unit of `from`.",
"type": "number"
},
"result": {
"description": "The converted value.",
"type": "number"
},
"source": {
"description": "Present for currency: \"ECB\".",
"type": "string"
},
"to": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": [
"value",
"from",
"to",
"category",
"result"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Use it
curl
curl "https://402utils.com/v1/unit-convert" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://402utils.com/v1/unit-convert");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://402utils.com/v1/unit-convert")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/5909.json, and this resource appears in /discovery/resources and /discovery/search.