Developers
A free JSON conversion API and a copy-paste converter widget, both built on the same exact factors as the rest of UnitGlide. No key, no sign-up.
JSON API
Send a GET request with a from unit id, a to unit id and an optional value (default 1). Responses are CORS-open, so you can call it straight from the browser.
Request
https://unitglide.net/api/convert?from=kg&to=lb&value=5Response
{
"ok": true,
"category": "mass",
"value": 5,
"from": { "id": "kg", "name": "Kilogram", "symbol": "kg" },
"to": { "id": "lb", "name": "Pound", "symbol": "lb" },
"result": 11.023113109243878,
"formatted": "11.0231",
"source": "https://unitglide.net/convert/kg-to-lb"
}result is the full-precision number; formatted is the trimmed display value. Unit ids are the short slugs used across the site (kg, lb, cm, c, f…). Both units must be in the same category, or the API returns a 400 with an explanation.
The full catalogue of categories and unit ids is available at /api/units.
Embeddable widget
Drop a converter onto any page with an <iframe>. Swap kg-to-lb for any pair slug on the site. The attribution link below the frame is all we ask in return — it is also what makes the widget free.
Copy this
<iframe src="https://unitglide.net/embed/kg-to-lb"
width="360" height="200" loading="lazy"
style="border:1px solid #e2e6ec;border-radius:12px"
title="Kg to Lbs converter"></iframe>
<p><a href="https://unitglide.net/convert/kg-to-lb">Kg to Lbs Converter</a> by UnitGlide</p>Result
Terms
Both the API and the widget are free for personal and commercial use. Please keep the attribution link, do not hammer the API with automated bulk traffic, and note that the service is provided as-is without a uptime guarantee. Questions or a higher-volume need? Get in touch.
How the numbers are derived
Every value the API and widget return comes from the exact SI and NIST factors documented on the methodology and sources page.