data

Use this when you need to convert a value between units within one category (length, weight, temperature, volume, data, speed, area, time) instead of doing conversion arithmetic yourself.

Use this when you need to convert a value between units within one category (length, weight, temperature, volume, data, speed, area, time) instead of doing conversion arithmetic yourself. Deterministic: same input, same output. Temperature uses the correct offset formulas (Celsius/Fahrenheit/Kelvin), not a naive ratio, and unit keys are case-sensitive (e.g. km, lb, celsius, MB) while the category name is case-insensitive. Example: {category:'length', value:5, from:'km', to:'mile'} -> result 3.10685596119. Returns the echoed category/value/from/to plus the converted result, rounded to 12 significant figures (switching to exponential for very large or very small magnitudes).

post/v1/convert_units

Request

  • Base URL: https://api.clean.tools
  • URL: https://api.clean.tools/v1/convert_units
  • Auth: none declared

Request body

category'length' | 'weight' | 'temperature' | 'volume' | 'data' | 'speed' | 'area' | 'time' required

Unit category.

valuenumber required

The numeric value to convert.

fromstring required

Source unit key (e.g. km, lb, celsius, MB).

tostring required

Target unit key.

Response

Structured tool result.

toolstring

Changes

No recorded changes to this operation across all 1 revision of this API.