Convertitive API
Free JSON conversion API · CORS-enabled · No API key
Every Convertitive conversion is also exposed as a JSON HTTP endpoint under /api/v1/. No signup, no API key, no rate limit beyond Cloudflare’s default DDoS protection. Suitable for ad-hoc scripts, dashboards, and low-volume product integrations.
Quick start
curl 'https://convertitive.com/api/v1/convert/unit?category=length&from=cm&to=inches&value=5'
All endpoints return a JSON envelope with ok: true on success and a structured error object (with code field) on failure.
Endpoints
Request
curl https://convertitive.com/api/v1/categories
Response
{
"ok": true,
"data": [
{
"id": "length",
"name": "Length",
"baseUnit": "m",
"unitCount": 12,
"units": [
{ "id": "cm", "name": "centimeter", "symbol": "cm", ... },
...
]
},
...
]
}GET/api/v1/categories/{id}
Full details of a single category, including intro prose and every unit.
Request
curl https://convertitive.com/api/v1/categories/length
Response
{ "ok": true, "data": { "id": "length", "name": "Length", "intro": "...", "units": [...] } }GET/api/v1/convert/unit
Convert between two units within the same category. Required params: category, from, to, value.
Request
curl 'https://convertitive.com/api/v1/convert/unit?category=length&from=cm&to=inches&value=5'
Response
{
"ok": true,
"data": {
"from": { "id": "cm", "symbol": "cm", "name": "centimeter" },
"to": { "id": "inches", "symbol": "in", "name": "inch" },
"value": 5,
"result": 1.9685039370078738
},
"meta": { "category": "length", "factor": 0.39370078740157477 }
}Request
curl 'https://convertitive.com/api/v1/convert/base?from=decimal&to=hexadecimal&value=255'
Response
{ "ok": true, "data": { "from": { "id": "decimal", "radix": 10 }, "to": { "id": "hexadecimal", "radix": 16 }, "value": "255", "result": "FF" } }GET/api/v1/convert/color
Convert between HEX, RGB, HSL, and HSV. Returns the formatted output string and the canonical sRGB triple.
Request
curl 'https://convertitive.com/api/v1/convert/color?from=hex&to=rgb&value=%23FF6B35'
Response
{ "ok": true, "data": { "from": { "id": "hex", "name": "HEX" }, "to": { "id": "rgb", "name": "RGB" }, "value": "#FF6B35", "result": "rgb(255, 107, 53)", "rgb": { "r": 255, "g": 107, "b": 53 } } }GET/api/v1/convert/currency
Convert between currencies at the latest ECB mid-market rate. Cached for 1 hour.
Request
curl 'https://convertitive.com/api/v1/convert/currency?from=USD&to=EUR&value=100'
Response
{ "ok": true, "data": { "from": { "code": "USD", "name": "US Dollar" }, "to": { "code": "EUR", "name": "Euro" }, "value": 100, "result": 92.5 }, "meta": { "rate": 0.925, "rateDate": "2026-05-12", "source": "European Central Bank via Frankfurter" } }Request
curl https://convertitive.com/api/v1/currency/rates
Response
{ "ok": true, "data": { "base": "EUR", "date": "2026-05-12", "rates": { "USD": 1.08, "GBP": 0.85, ... } } }Request
curl https://convertitive.com/api/v1/health
Response
{ "ok": true, "data": { "service": "convertitive-api", "version": "v1", "uptime": 12345.6 } }Error format
When a request fails, the response sets ok: false and returns a structured error.
{
"ok": false,
"error": "Unknown unit 'cmm' in category 'length'",
"code": "UNKNOWN_UNIT"
}Possible codes:
BAD_REQUEST — missing or malformed query parameterINVALID_VALUE — value out of range or unparseableUNKNOWN_CATEGORY — category id not recognisedUNKNOWN_UNIT — unit id not present in the specified categoryUNKNOWN_BASE — base id not in (binary | octal | decimal | hexadecimal)UNKNOWN_FORMAT — color format id not in (hex | rgb | hsl | hsv)UNKNOWN_CURRENCY — ISO 4217 code not supported
CORS & caching
All endpoints set Access-Control-Allow-Origin: * — you can call them from any browser origin. The deterministic endpoints (unit / base / color) carry a one-day cache header; currency endpoints carry a one-hour cache header matching the upstream rate refresh.
Fair use
The API is intentionally free and unauthenticated. Cloudflare in front of the origin will rate-limit obvious scraping. For high-volume integrations (above a few thousand requests per day), please host your own copy — the Convertitive source is available on GitHub.