GET /measure/{measure}?to={unit}

Measurement API

Different units. One clear answer.

Include the unit. Leave the target empty for the standard unit.

Number format & unit system

Locale reads number punctuation. The unit system resolves names such as gallon. Neither setting is inferred.

Example response

{
  "measure": "5 ft 11 in",
  "valid": true,
  "type": "length",
  "amount": "180.34",
  "unit": "cm",
  "reason": null,
  "choices": []
}
Supported units

One pooled request. Included on every plan.

What comes back.

measure

The measurement supplied by the caller

valid

Whether the measurement is understood without guessing

type

Measurement type, such as length, mass, or temperature; null when unresolved

amount

Decimal string in the returned unit, up to 18 significant digits rounded half away from zero. Null when invalid. Keep it as a string or use a decimal library when precision matters

unit

Canonical target unit, or the standard unit for this type when to is omitted

reason

Null when valid. Otherwise ambiguous_unit, unknown_unit, invalid_measure, ambiguous_number, or missing_unit

choices

Available unit interpretations as {unit, name} objects; empty when no choice is available

1

Pass a measurement

5 ft 11 in. 2.5 kg. Keep the value people actually entered.

2

Choose your unit

Convert to a compatible unit, or use the standard unit for its type.

3

Use the result

A decimal amount and unit for your form, catalog, or next calculation.

Coverage

Length, area, volume, mass, temperature, duration, speed, and other supported measurement types. Browse the catalog for supported unit codes.

A height in feet and inches. A weight in kilograms. A speed with a compound unit. Send the measurement you have and get a decimal amount, unit, and measurement type. Add to for a compatible target unit.

Keep the original value beside the result. Ambiguous numbers and units return an explicit reason and available choices. Use locale for number punctuation and system for US or imperial unit meaning. No location guessing.

Measured response times and live API status

Units, sorted.

Parse measurements and convert units. Every plan.

Start includes 1M API requests a month for $20/mo.

Make your first request.

One key works across the APIs. Copy a request in your language and get JSON back.

curl "https://api.parseapi.com/measure/5%20ft%2011%20in?to=cm" \
  -H "X-API-Key: YOUR_API_KEY"
// Example response · 200
{
  "measure": "5 ft 11 in",
  "valid": true,
  "type": "length",
  "amount": "180.34",
  "unit": "cm",
  "reason": null,
  "choices": []
}

API referenceSDKsKeys and authentication

Every response field

Response fields

measure
The measurement supplied by the caller
valid
Whether the measurement is understood without guessing
type
Measurement type, such as length, mass, or temperature; null when unresolved
amount
Decimal string in the returned unit, up to 18 significant digits rounded half away from zero. Null when invalid. Keep it as a string or use a decimal library when precision matters
unit
Canonical target unit, or the standard unit for this type when to is omitted
reason
Null when valid. Otherwise ambiguous_unit, unknown_unit, invalid_measure, ambiguous_number, or missing_unit
choices
Available unit interpretations as {unit, name} objects; empty when no choice is available

Build with Measure

All tutorials →

QUESTIONS

Which units can I convert?
Use /measure/units to browse supported unit definitions. Units must be compatible: length converts to length and mass to mass. A mass does not become a volume without additional information such as density.
Can I pass feet and inches together?
Yes. Send 5 ft 11 in and add to=cm for 180.34 centimeters. The original measurement is retained in measure.
How are ambiguous units handled?
The API returns valid: false, a reason, and unit choices when available. Give a precise unit or set system=us or system=imperial when that is the intended meaning. Locale controls number punctuation; it does not select a unit system.
Why is the amount a string?
Amounts use one decimal-string format across responses. This avoids silently switching between numbers and strings. Keep the returned string for display or use decimal arithmetic for further calculations.
What does a conversion cost?
One pooled request on every plan. There is no separate verification charge.

Convert a measurement with the unit converter.