URL Prefilling new
You can construct a shareable link that loads with specific units and a value already set. The page applies the parameters on load and calculates immediately.
/unitperverter/?cat=category&from=left-unit&to=right-unit&v=value
| Param | Description | Example |
cat | Category ID | volume |
from | Left unit ID | pint |
to | Right unit ID | kilo_liter |
v | Input value (optional) | 12.5 |
Unit ID Format
Unit IDs used in from and to follow these rules:
| Unit type | ID format | Examples |
| SI base unit (no prefix) | basekey | liter, gram, meter |
| SI base with prefix | prefixname_basekey | kilo_liter, milli_gram, mega_meter |
| Special / non-SI unit | special-id | pint, swim_pool, hogshead |
| Temperature | special-id | celsius, fahrenheit, kelvin |