Dev tools

Length converter

Length converter, no network, no rounding surprises.

Runs on your device. The file is never uploaded.

Length converter turns a value from one of nine units into another, spanning mm through km plus mi, yd, ft, in and nmi. Metres are the base, and the inch is exactly 0.0254 m by definition. mi is the statute mile and nmi the nautical one of 1852 m, roughly 15 percent apart.

Options

Questions

Which length units are supported?

Nine: m, km, cm, mm, mi, yd, ft, in and nmi. Meters are the base, and every other unit is defined against it. A mile is 1609.344 m, a yard 0.9144, a foot 0.3048, an inch 0.0254 and a nautical mile 1852. You pick both the from unit and the to unit, since neither has a default.

Is mi a nautical mile or a statute mile?

mi is the statute mile of 1609.344 meters. nmi is the separate nautical mile of exactly 1852 meters, the one used at sea and in the air. They sit about 15 percent apart, so confusing them is the most expensive mistake this converter can save you from.

Are the imperial factors exact?

Yes, they are the exact international definitions rather than rounded ones: 0.0254 m to the inch, 0.3048 to the foot, 0.9144 to the yard and 1609.344 to the mile. What you might still see is an ordinary floating-point tail, because the value is multiplied by the from factor and divided by the to factor in double precision.

What about microscopic or astronomical lengths?

The table stops at mm on one end and km on the other, so microns, nanometers, astronomical units and light years are not offered. Within that range there is nothing to overflow: the whole conversion is one multiply and one divide. Scientific notation is accepted in the value field, so 1e6 is a valid entry.

Why does it say value must be a number?

Because the value field did not parse as a finite number. An empty box, a unit left in the value such as "5 km", a comma used as the decimal point, or a thousands separator all fail. Type a bare decimal number and choose the unit from the dropdown instead.

What does the result look like?

One line naming both units, such as 1 m = 1000 mm. Nothing is rounded, so you see the full double-precision figure. The whole conversion runs in a Web Worker in this tab against a small table compiled into the page, so nothing is uploaded and it works offline.

Related Dev tools