Unit Conversion

Convert between units of measurement and discover available conversion types. Supports length, weight, volume, temperature, area, and speed conversions.

Get API Key

Overview

Use Cases

  • Scientific and engineering calculations
  • Travel and distance planning
  • Recipe scaling and cooking conversions
  • Fitness and health tracking
  • Educational tools
  • Build unit selection dropdowns in UIs

Features

Length, weight, volume, temperature, area, and speed conversions
39 supported units across 6 categories
Human-readable formula in every response
Results rounded to 6 decimal places
Fast, no-database lookups
Endpoint to discover all available units

API Endpoints

Convert Units

Convert a value from one unit to another

GET
https://api.requiems.xyz/v1/misc/convert

Parameters

Name Type Required Description
from string Required Source unit key (e.g. miles, kg, c)
to string Required Target unit key (e.g. km, lb, f)
value number Required Numeric value to convert

Try it out

Live Demo
Request

Source unit key (e.g. miles, kg, c)

Target unit key (e.g. km, lb, f)

Numeric value to convert

Response Fields

Field Type Description
from string Source unit key
to string Target unit key
input number The original input value
result number The converted value (rounded to 6 decimal places)
formula string Human-readable conversion formula

Code Examples

curl "https://api.requiems.xyz/v1/misc/convert?from=miles&to=km&value=10" \
  -H "requiems-api-key: YOUR_API_KEY"

List Available Units

Returns all available unit conversion types grouped by measurement category

GET
https://api.requiems.xyz/v1/misc/convert/units

Try it out

Live Demo
Request

Response Fields

Field Type Description
length array Available length units: millimeter (mm), centimeter (cm), meter (m), kilometer (km), inch (in), foot (ft), yard (yd), mile (miles), nautical mile (nmi)
weight array Available weight units: milligram (mg), gram (g), kilogram (kg), metric ton (t), ounce (oz), pound (lb), stone (stone)
volume array Available volume units: milliliter (ml), liter (l), teaspoon (tsp), tablespoon (tbsp), fluid ounce (fl_oz), cup (cup), pint (pt), quart (qt), gallon (gal)
temperature array Available temperature units: celsius (c), fahrenheit (f), kelvin (k)
area array Available area units: square millimeter (mm2), square centimeter (cm2), square meter (m2), square kilometer (km2), square inch (in2), square foot (ft2), square yard (yd2), acre (acre), hectare (ha)
speed array Available speed units: meters per second (m_s), kilometers per hour (km_h), miles per hour (mph), knots (knots)

Code Examples

curl https://api.requiems.xyz/v1/misc/convert/units \
  -H "requiems-api-key: YOUR_API_KEY"

Frequently Asked Questions