← All microservices
Unit converter
Data
Convert between 104 units of length, mass, volume, area, temperature, speed, time, data, pressure, energy, power and angle.
Want to see the job done first? Try the free Universal Unit Converter in your browser, no account needed.
Create an account
It comes with 10,000 free tokens a month.
What it does
- About 110 units in 12 categories
- Symbols or names: lb, lbs or pounds
- One unit, or the whole category at once
- Choose your decimal places
Good for
- Recipe and product sites
- Shipping weights and sizes
- Engineering tools
Factors are the exact definitions where one exists: an inch is exactly 25.4 mm and a pound exactly 0.45359237 kg.
Try it now
No account needed. Up to 10 runs a day here, files up to 2MB, and nothing is kept.
Example
GETPOST https://bloodweb.net/api/v1/unit-convert
curl -H "Authorization: Bearer YOUR_KEY" "https://bloodweb.net/api/v1/unit-convert?value=5&from=lb&to=kg"
Complete, tested code for this call: curl · Node.js · Python · PHP
Options
| Name | Description |
|---|---|
value
required |
The amount to convert. |
from
required |
The unit it is in: a symbol (kg, mph, GiB) or a name (pounds, fahrenheit). |
to
|
The unit to convert to. Leave out for every unit in the same category. |
precision
|
Round results to this many decimal places. Left out, results keep 12 significant figures. |
Returns
JSON: {"value", "from", "to", "result", "category"}, or "results" for every unit when "to" is left out.
Good to know
- Your files exist on our server only while the call runs, and are deleted when it ends. We keep a record of the call, never the file.
- A call that fails costs nothing.
- Run by Bloodweb (ABN 65 757 166 166) in Australia, under the microservices terms.
- Questions go to support@bloodweb.net, and we reply within one business day.
- Every service is checked every hour: see the status page.