← All tool references

Converters · execute

Unit Converter

Convert length, mass, volume, temperature, speed, and area measurements with compatible unit catalogs and SI-based factors.

Open public tool

Overview

Category
Converters
API mode
execute
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/unit-converter

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/unit-converter/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

value · number · required
Quantity to convert.
category · string · required
Measurement family. Accepted values: length, mass, volume, temperature, speed, area.
from_unit · string · required
Source-unit key.
to_unit · string · required
Target-unit key.
{
    "type": "object",
    "properties": {
        "value": {
            "type": "number",
            "description": "Quantity to convert."
        },
        "category": {
            "type": "string",
            "enum": [
                "length",
                "mass",
                "volume",
                "temperature",
                "speed",
                "area"
            ],
            "description": "Measurement family."
        },
        "from_unit": {
            "type": "string",
            "description": "Source-unit key."
        },
        "to_unit": {
            "type": "string",
            "description": "Target-unit key."
        }
    },
    "required": [
        "value",
        "category",
        "from_unit",
        "to_unit"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

result · number
Converted quantity.
from_unit · string
Source-unit key.
to_unit · string
Target-unit key.
category · string
Measurement family.
formula · string
Conversion method.
{
    "type": "object",
    "properties": {
        "result": {
            "type": "number",
            "description": "Converted quantity."
        },
        "from_unit": {
            "type": "string",
            "description": "Source-unit key."
        },
        "to_unit": {
            "type": "string",
            "description": "Target-unit key."
        },
        "category": {
            "type": "string",
            "description": "Measurement family."
        },
        "formula": {
            "type": "string",
            "description": "Conversion method."
        }
    },
    "additionalProperties": false
}

Meters to feet

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/unit-converter/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "value": 1,
    "category": "length",
    "from_unit": "m",
    "to_unit": "ft"
}'
{
    "ok": true,
    "data": {
        "slug": "unit-converter",
        "result": {
            "values": {
                "result": 3.280839900000000142199496622197329998016357421875,
                "from_unit": "m",
                "to_unit": "ft",
                "category": "length",
                "formula": "Source value × source SI factor ÷ target SI factor"
            },
            "display": {
                "display": "3.2808399"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.