general

Convert between units across 10 categories: length (m, km, mi, ft, in, yd, nmi), mass (kg, lb, oz, g, ton), volume (l, gal, ml, cup, fl_oz), area (m2, ft2, acre, hectare), speed (mps, kph, mph, knot), pressure (pa, psi, bar, atm, mmhg), energy (j, kwh, btu, cal, wh), data (b, kb, mb, gb, tb), time (s, ms, min, hr, day, year), and temperature (c, f, k). Accepts any value with source and target unit abbreviations. Returns the converted result with the formula used.

post/api/unit_convert

Request

  • Base URL: https://calc.engineer
  • URL: https://calc.engineer/api/unit_convert
  • Auth: none declared

Request body

valuenumber required

The numeric value to convert.

fromstring required

Source unit abbreviation (e.g., 'km', 'lb', 'f', 'psi', 'kwh'). Case-insensitive.

tostring required

Target unit abbreviation (e.g., 'mi', 'kg', 'c', 'bar', 'btu'). Case-insensitive.

Response

Computed result for unit_convert

toolstring required
versionstring required
computed_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.