---
title: "Unit Converter"
method: GET
path: "/api/convert"
tags: ["Calculators"]
---

# Unit Converter

`GET /api/convert`

## Request

- Base URL: `https://www.freightutils.com`
- URL: `https://www.freightutils.com/api/convert`
- Auth: none declared

Convert between freight-relevant units — weights, volumes, lengths, and freight-specific conversions (CBM to chargeable weight using IATA 6000 divisor, CBM to freight tonnes using W/M rule).

## Query parameters

- `value` number, required
- `from` 'kg' | 'lbs' | 'oz' | 'tonnes' | 'short_tons' | 'long_tons' | 'cbm' | 'cuft' | 'cuin' | 'litres' | 'gal_us' | 'gal_uk' | 'cm' | 'inches' | 'm' | 'feet' | 'mm', required
- `to` 'kg' | 'lbs' | 'oz' | 'tonnes' | 'short_tons' | 'long_tons' | 'cbm' | 'cuft' | 'cuin' | 'litres' | 'gal_us' | 'gal_uk' | 'cm' | 'inches' | 'm' | 'feet' | 'mm' | 'chargeable_kg' | 'freight_tonnes', required

## Response `200`

Conversion result.

- ConversionResult
  - `input` object, required
    - `value` number, required: Input value.
    - `unit` string, required: Input unit code.
    - `name` string, required: Input unit name.
  - `result` object, required
    - `value` number, required: Converted value.
    - `unit` string, required: Output unit code.
    - `name` string, required: Output unit name.
  - `formula` string, required: Human-readable conversion formula.
  - `note` string: Additional context for freight-specific conversions.
  - `_source` SourceEnvelope: Additive provenance citation for the dataset or method behind this response, from FreightUtils' single provenance source of truth. Shapes: reference, methodology (calculators), or reference with provenance_status:'pending-verification'. Fields appear only when a real value exists.
    - `type` 'reference' | 'methodology', required
    - `authority` string
    - `dataset` string
    - `source_url` string
    - `data_vintage` string
    - `licence` string
    - `retrieved_via` string
    - `standard` string
    - `reference` string
    - `computed_by` string
    - `provenance_status` 'pending-verification'
    - `dataset_edition` string: Edition this response is served from (editioned reference datasets only), e.g. 'UN/LOCODE 2025-1'.
    - `authority_current_edition` string: The authority's current in-force edition at the last check. Differs from dataset_edition only when the served data lags the authority.
    - `checked_at` string: YYYY-MM-DD of the last served-vs-authority edition comparison (on-demand checker, staleness-guarded).

## Other responses

- `400`: Invalid or missing parameters.

---

[API](https://skmtc.dev/freightutils/apis/freightutils-api.md) · [All operations](https://skmtc.dev/freightutils/apis/freightutils-api/llms.txt) · [OpenAPI document](https://skmtc.dev/freightutils/apis/freightutils-api/revisions/6607bb3cea90?raw)
