Measurement Units
169 measurement units spanning 35 physical and digital quantities — length, mass, time, area, volume, temperature, speed, force, energy, power, pressure, angle, frequency, electric quantities, and more — each with its symbol, quantity type, measurement system (SI/metric/imperial/US), and a numeric conversion factor to the SI base unit of that quantity.
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/measurement-units.json
Or use as a typed import:
import { measurementUnits } from "https://staticdata.dev/v1/measurement-units.ts"
Formats
- JSON 22.3 KB
/v1/measurement-units.json
min: 16.3 KB · /v1/measurement-units.min.json
- CSV 6.5 KB
/v1/measurement-units.csv
- TypeScript 22.5 KB
/v1/measurement-units.ts
export const measurementUnits
type MeasurementUnit = (typeof measurementUnits)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| name | string | Full human-readable name of the unit | Metre |
| symbol | string | Standard symbol or abbreviation for the unit | m |
| quantity | string | Physical or digital quantity the unit measures | length |
| system | string | Measurement system: SI, metric, imperial, or US (SI is used loosely here, also covering non-SI units used alongside it, e.g. hour, nautical mile, light-year, electronvolt) | SI |
| toBaseFactor | number | null | Multiply by this to convert to the SI base unit; null for offset-based units (e.g. Fahrenheit) | 1 |
Preview
First 10 records.
| name | symbol | quantity | system | toBaseFactor |
|---|---|---|---|---|
| Metre | m | length | SI | 1 |
| Kilometre | km | length | SI | 1000 |
| Centimetre | cm | length | SI | 0.01 |
| Millimetre | mm | length | SI | 0.001 |
| Micrometre | µm | length | SI | 0.000001 |
| Nanometre | nm | length | SI | 1e-9 |
| Inch | in | length | imperial | 0.0254 |
| Foot | ft | length | imperial | 0.3048 |
| Yard | yd | length | imperial | 0.9144 |
| Mile | mi | length | imperial | 1609.344 |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/measurement-units.json | jq '.[0]' import type { MeasurementUnit } from "https://staticdata.dev/v1/measurement-units.ts";
const res = await fetch("https://staticdata.dev/v1/measurement-units.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const measurementUnits: MeasurementUnit[] = await res.json();
console.log(measurementUnits[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/measurement-units.min.json") as r:
measurementUnits = json.load(r)
print(measurementUnits[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/measurement-units.min.json")
if err != nil { panic(err) }
defer resp.Body.Close()
var data []map[string]any
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
panic(err)
}
fmt.Println(data[0])
} use serde_json::Value;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let body = ureq::get("https://staticdata.dev/v1/measurement-units.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
This dataset was curated from the NIST Special Publication 330 (The International System of Units) and SP 811 (Guide to the SI), cross-referenced with BIPM definitions. It covers 169 units across 35 quantity categories including all seven SI base units and a selection of their common prefixed multiples, plus widely used non-SI units accepted for use with the SI (litre, tonne, bar, electronvolt, etc.) and traditional imperial and US customary units.
The toBaseFactor field gives the multiplicative factor needed to convert a value in that unit to the SI base unit for that quantity (e.g., metre for length, kilogram for mass, second for time, square metre for area, cubic metre for volume, kelvin for temperature). Degree Celsius and degree Fahrenheit use an affine (offset + scale) conversion rather than a pure multiplicative one, so their toBaseFactor is null — consumers should apply the standard offset formulas (K = °C + 273.15; K = (°F + 459.67) × 5/9). The Rankine scale starts at absolute zero, so it has a plain factor of 5/9. Digital information units use the bit as the base unit; decimal byte-multiples follow the SI prefixes (kB = 8000 bits) while binary-prefixed IEC units (KiB, MiB, GiB, TiB) use powers of 1024.
Mach speed is given at standard sea-level conditions (15 °C, 1 atm) where the speed of sound is approximately 340.3 m/s; this value varies with altitude and temperature. The calorie value used is the thermochemical calorie (4.184 J) rather than the International Table calorie (4.1868 J). Horsepower is the mechanical (imperial) variant (≈ 745.7 W); metric horsepower (PS, ≈ 735.5 W) is not included. The torr is 101325/760 Pa, while the conventional millimetre of mercury is 133.322387415 Pa. The system value SI is applied loosely: it also covers non-SI units commonly used alongside the SI, such as the minute, hour, day, week, Julian year, nautical mile, knot, astronomical unit, light-year, parsec, electronvolt, Mach number, decibel and neper. All other conversion factors are exact or use the best available NIST/BIPM-defined values.
Versioning
URLs under /v1/ are stable: field names and types will not change in a way
that breaks consumers. Values can be corrected or records added when the upstream source
changes; schema-incompatible updates ship under a new version path. See the
measurement-units changelog for this dataset's history.
Related datasets
More Code datasets
- ansi-colors
- ascii
- cron-presets
- css-at-rules
- css-functions
- css-named-colors
- css-properties
- css-pseudo-classes
- css-pseudo-elements
- data-units
- exit-codes
- file-signatures
- hash-algorithms
- js-array-methods
- js-math-methods
- js-object-methods
- js-string-methods
- json-schema-keywords
- jwt-claims
- mathematical-constants
- node-builtin-modules
- owasp-top-10
- periodic-table
- physical-constants
- posix-signals
- programming-languages
- regex-flags
- regex-patterns
- roman-numerals
- si-base-units
- si-derived-units
- si-prefixes
- spdx-licenses
- strftime-tokens
- tailwind-colors
- time-units
- unicode-blocks
- unicode-general-categories
- unicode-planes
- unix-file-permissions
- xterm-256-colors