UnifyUnitsDevelopers

Precision & numeric values

Values are always decimal strings, not JSON numbers.This preserves decimal intent and avoids binary floating-point loss.

Correct vs invalid

json
{"value": "0.1", "from": "m", "to": "cm"}

Not valid in v1:

json
{"value": 0.1, "from": "m", "to": "cm"}

Accepted formats

FormatExampleAccepted
Integer"10"Yes
Negative"-10"Yes
Decimal"10.5"Yes
Scientific"1.25e6"Yes
NaN / Infinity"NaN"No
Comma-separated"1,000"No
Fraction"1/2"No
With unit suffix"10 kg"No

Temperature

Temperature uses affine conversion (offset + scale). Results are deterministic for the same input under the same API version.

InputFromToResult
"32"FC"0"
"0"CK"273.15"
"-40"CF"-40"