---
title: "Unit conversion"
method: GET
path: "/api/v1/calculate/unit-converter"
---

# Unit conversion

`GET /api/v1/calculate/unit-converter`

## Request

- Base URL: `https://everycalc.xyz`
- URL: `https://everycalc.xyz/api/v1/calculate/unit-converter`
- Auth: none declared

Converts a value between units in one category: length, weight, temperature, volume, or speed. Returns the converted result in the page's display precision, the value in base units, and the conversion rate (null for temperature, which uses an offset scale). Unit codes must belong to the chosen category. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.

## Query parameters

- `category` 'length' | 'weight' | 'temperature' | 'volume' | 'speed'
- `value` number, required
- `from_unit` 'm' | 'km' | 'cm' | 'mi' | 'ft' | 'in' | 'kg' | 'g' | 'lb' | 'oz' | 'C' | 'F' | 'K' | 'L' | 'mL' | 'gal' | 'floz' | 'ms' | 'kmh' | 'mph'
- `to_unit` 'm' | 'km' | 'cm' | 'mi' | 'ft' | 'in' | 'kg' | 'g' | 'lb' | 'oz' | 'C' | 'F' | 'K' | 'L' | 'mL' | 'gal' | 'floz' | 'ms' | 'kmh' | 'mph'

## Response `200`

Calculation result.

## Other responses

- `400`: Invalid input.

---

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