---
title: Unit and Number Conversion API
slug: unit-and-number-conversion
url: https://apyhub.com/freedailypro/service/unit-and-number-conversion
provider: FreeDailyPro
tags: [unit-conversion, weight-conversion, length-conversion, temperature-conversion, roman-numeral-converter, file-size-conversion, measurement-converter]
auth: api_key
version: v1
service_type: sync
endpoints: 5
atoms: 10
mcp: true
---

# Unit and Number Conversion API

Convert weight, length, temperature, file sizes and Roman numerals with one API. Simplify unit and number conversions in your applications.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/weight` | What it does Converts a weight value from one unit to another and returns the conversion result. Th… | 10 |
| POST | `https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/temperature` | What it does Converts a temperature from one unit to another among Celsius, Fahrenheit, and Kelvin.… | 10 |
| POST | `https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/file-size` | What it does Converts a numeric file size from one unit to another for the /file-size endpoint. You… | 10 |
| POST | `https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/length` | What it does Converts a numeric length value from one supported unit to another. Submit the source… | 10 |
| POST | `https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/roman` | What it does Converts a value between Arabic numbers and Roman numerals. Send a request body with d… | 10 |

## Endpoint reference

### Convert a weight between kilograms, grams, pounds and ounces

`POST https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/weight` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `to` | body | string | yes | One of: kg, g, mg, lb, oz. |
| `from` | body | string | yes | One of: kg, g, mg, lb, oz. |
| `value` | body | number | yes |  |

#### Quickstart

Convert a weight by sending the value and units to the endpoint.

```bash
curl -X POST "https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/weight" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value": 10, "from": "kg", "to": "lb"}'
```

#### What you'll get back

Returns a JSON object. The output schema does not declare any top-level fields, so the response shape is not specified here.

```json
{
  "result": 22.046226218487757
}
```

### Convert a temperature between Celsius, Fahrenheit and Kelvin

`POST https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/temperature` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `to` | body | string | yes | One of: C, F, K. |
| `from` | body | string | yes | One of: C, F, K. |
| `value` | body | number | yes |  |

#### Quickstart

Convert a temperature value from one unit to another by sending the source unit, target unit, and numeric value.

```bash
curl -X POST "https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/temperature" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value":25,"from":"C","to":"F"}'
```

#### What you'll get back

Returns a JSON object. The output schema does not declare any top-level fields, so the response shape is not specified here.

```json
{
  "result": 77
}
```

### Convert a file size between bytes, KB, MB, GB, TB and PB

`POST https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/file-size` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `to` | body | string | yes | One of: B, KB, MB, GB, TB, PB. |
| `from` | body | string | yes | One of: B, KB, MB, GB, TB, PB. |
| `value` | body | number | yes |  |

#### Quickstart

Convert a file size from one unit to another with a single JSON request.

```bash
curl -X POST "https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/file-size" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value":1024,"from":"B","to":"KB"}'
```

#### What you'll get back

Returns a JSON object. The schema does not declare any top-level fields, so the exact response shape is not specified here.

```json
{
  "result": {
    "bytes": 1024,
    "converted": 1,
    "from": "B",
    "to": "KB",
    "formatted": "1 KB"
  }
}
```

### Convert a length between metres, kilometres, inches, feet, yards and miles

`POST https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/length` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `to` | body | string | yes | One of: m, cm, mm, km, in, ft, yd, mi. |
| `from` | body | string | yes | One of: m, cm, mm, km, in, ft, yd, mi. |
| `value` | body | number | yes |  |

#### Quickstart

Convert a length by sending the value and source/target units in a JSON body.

```bash
curl -X POST "https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/length" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value":100,"from":"cm","to":"m"}'
```

#### What you'll get back

Returns a JSON object. The response schema does not declare any fields, so no response shape is guaranteed here.

```json
{
  "result": 1
}
```

### Convert numbers to Roman numerals and back

`POST https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/roman` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `value` | body | any | yes | toRoman: a whole number from 1 to 3,999,999 (above 3,999 the thousands get a bar over every letter, written with the Unicode combining overline U+0305). fromRoman: a numeral; barred letters may be ty… |
| `direction` | body | string | yes | One of: toRoman, fromRoman. |

#### Quickstart

Convert a value to or from Roman numerals by sending the required `direction` and `value` fields.

```bash
curl -X POST "https://api.eu.apyhub.com/freedailypro/unit-and-number-conversion/roman" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"direction":"toRoman","value":1984}'
```

#### What you'll get back

Returns a JSON object. The output schema does not declare any top-level fields, so the exact response shape is not specified here.

```json
{
  "result": "MCMLXXXIV",
  "vinculum": false,
  "breakdown": "M + CM + LXXX + IV",
  "steps": [
    {
      "label": "thousands: 1,000",
      "formula": "1,000 is written M",
      "inputs": {
        "value": "1,000"
      },
      "result": "M"
    },
    {
      "label": "hundreds: 900",
      "formula": "900 is written CM",
      "inputs": {
        "value": "900"
      },
      "result": "CM"
    },
    {
      "label": "tens: 80",
      "formula": "80 is written LXXX",
      "inputs": {
        "value": "80"
      },
      "result": "LXXX"
    },
    {
      "label": "ones: 4",
      "formula": "4 is written IV",
      "inputs": {
        "value": "4"
      },
      "result": "IV"
    },
    {
      "label": "Join the pieces",
      "formula": "Write the pieces from the largest place to the smallest",
      "inputs": {
        "pieces": "M + CM + LXXX + IV"
      },
      "result": "MCMLXXXIV"
    }
  ]
}
```

## About

## What it does
Unit Conversion API converts values across common measurement systems. Send a numeric `value` plus `from` and `to` units, and get back a converted result as an object.

Use it for weight conversion between `kg`, `g`, `mg`, `lb`, and `oz`; temperature conversion between `C`, `F`, and `K`; file size conversion between `B`, `KB`, `MB`, `GB`, `TB`, and `PB`; and length conversion between `m`, `cm`, `mm`, `km`, `in`, `ft`, `yd`, and `mi`. It also converts Roman numerals in both directions: set `direction` to `toRoman` or `fromRoman` and pass a `value` as a number or string as required.

This is useful when you normalize user-entered measurements, convert product dimensions, format storage values, or support locale-aware inputs in calculators and internal tools. The request shape is consistent across the conversion endpoints, which makes it easy to wire into forms, workflows, or backend validation logic.

If you need a small utility endpoint for turning one unit or numeral system into another, Unit Conversion API keeps the contract simple and focused.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/freedailypro/service/unit-and-number-conversion
