Unit Converter (incl. Japanese units)
convert_unitsConvert units with official exact factors (NIST etc.), including Japanese units (tsubo, jo/tatami, shaku, sun, go, Japanese cups and spoons), temperature and fuel economy. Returns the exact result, a rounded display value, the factor, and extras such as feet-and-inches, inch fractions (1/16) and pounds-and-ounces. Unit ids by category - length: mm, cm, m, km, in, ft, yd, mi, nmi, shaku, sun; mass: mg, g, kg, t, oz, lb, st, ons, kwintal; temp: c, f, k; volume: ml, l, m3, tsp, tbsp, floz, cup, pt, qt, gal, flozuk, galuk, cupjp, tbspjp, tspjp, go; area: cm2, m2, ha, km2, sqin, sqft, sqyd, ac, sqmi, tsubo, jo, donum; speed: mps, kmh, mph, kn, fps; fuel: kml, l100, mpg, mpguk; pressure: pa, kpa, mpa, bar, psi, atm, mmhg; energy: j, kj, cal, kcal, wh, kwh, btu; power: w, kw, hp, ps; data: b, kb, mb, gb, tb, kib, mib, gib, tib.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Unit id to convert to (same category). | |
| from | Yes | Unit id to convert from. | |
| lang | No | Language of the user. Use "ja" when the user writes in Japanese (affects the source link and notes). Default "en". | |
| value | Yes | Number to convert. Strings may use "," as thousands separator or fractions like "5 1/4". | |
| category | No | Optional; inferred from the units. | |
| significant_digits | No | Significant digits of result_formatted. Default 6. |