Home / APIs / Unit Converter

Unit Converter API

Convert length, mass, temperature, volume, area, speed, data, time, pressure, and energy.

Get it on RapidAPI ↗

Unit Converter handles conversions across ten categories — length, mass, temperature, volume, area, speed, data size, time, pressure, and energy — through one simple GET endpoint. Pass a value, a from unit, and a to unit (short codes like km, mi, kg, lb, c, f); the category is inferred automatically, or you can set it explicitly.

It also lists every category and the units within it, so you can build dropdowns and validation dynamically. Pure math, stateless, and instant — no data is stored. Great for calculators, e-commerce, fitness and recipe apps, engineering tools, and dashboards.

Step-by-step tutorial: Unit Conversion API: Length, Mass, Temperature, and 7 More Categories

Endpoints

MethodPathDescription
GET/convertconvert a value between units
GET/categorieslist categories
GET/unitsunits in a category

Quick start

cURL (via RapidAPI)
curl --request curl \
  --url 'https://unit-converter26.p.rapidapi.com/-G "https://unit-converter26.p.rapidapi.com/convert" -d "value=100" -d "from=km" -d "to=mi" -H "X-RapidAPI-Key: YOUR_KEY" -H "X-RapidAPI-Host: unit-converter26.p.rapidapi.com"' \
  --header 'X-RapidAPI-Key: YOUR_KEY' \
  --header 'X-RapidAPI-Host: unit-converter26.p.rapidapi.com' \
  --header 'content-type: application/json' \
  --data '{}'
JavaScript (fetch)
const res = await fetch('https://unit-converter26.p.rapidapi.com/-G "https://unit-converter26.p.rapidapi.com/convert" -d "value=100" -d "from=km" -d "to=mi" -H "X-RapidAPI-Key: YOUR_KEY" -H "X-RapidAPI-Host: unit-converter26.p.rapidapi.com"', {
  method: 'curl',
  headers: {
    'X-RapidAPI-Key': 'YOUR_KEY',
    'X-RapidAPI-Host': 'unit-converter26.p.rapidapi.com',
    'content-type': 'application/json'
  },
  body: JSON.stringify({})
});
const data = await res.json();
Example response
{
  "value": 100,
  "from": "km",
  "to": "mi",
  "category": "length",
  "result": 62.1371
}

Pricing

Subscribe on RapidAPI. Start free; upgrade as you scale.

Basic
Free
1,000 requests / mo
Pro
$5 / mo
100,000 requests / mo
Ultra
$20 / mo
1,000,000 requests / mo
Mega
$50 / mo
2,000,000 requests / mo

For AI agents

Programmatic discovery and keyless testing:

Frequently asked questions

Are conversion rates updated?

Rates are based on standard definitions and rarely change.

Can I convert multiple values at once?

Each request handles a single conversion; batch requests are not supported.

Is there a limit on request size?

Parameters are small; no size limit beyond typical URL length.

Ready to build with Unit Converter?

Grab your key on RapidAPI and start on the free tier.

Get it on RapidAPI ↗