Length Converter

Convert a distance between metric and imperial units — typed however you normally write it.

Runs on your deviceConvertersWorkingNo account needed

What this tool does

Length Converter multiplies your value into metres using the defined factor for the unit you started in, then divides it back out into the unit you asked for. Those factors are the agreed ones rather than approximations: an inch is exactly 0.0254 m, a mile exactly 1609.344 m, a nautical mile exactly 1852 m. Sixteen units are covered — nanometre, micrometre, millimetre, centimetre, metre and kilometre; thou, inch, foot, yard, mile and nautical mile; and furlong, astronomical unit, light-year and parsec.

The input box takes one measurement per line, and what you type on the line outranks the dropdowns above it. A bare 12 uses the From and To settings; 12 in ignores the From setting; 10 km to mi ignores both. Feet and inches are understood in the forms people actually write them — 6'2", 6' 2", 5 ft 6 in, and a bare 74" — alongside fractions such as 1 1/2 ft and ½. Groupings are read in the comma and Swiss apostrophe styles, so 1'234 m is 1234 metres rather than feet; a full stop groups thousands only when there are two groups or more, which means 1.234.567 m is over a million while 1.234 m stays a decimal. Paste a whole column and every line is converted in its own right; set To to All units (table) and a single value is listed against every unit at once.

Three limits are worth knowing. Feet and inches go in but do not come out: every answer is one unit written as a decimal, so 6'2" is echoed back in decimal feet, and 187.96 cm converts to 6.166666667 ft rather than to 6 ft 2 in — turning that tail back into inches is left to you. The page also knows length units only, so kg or m² is refused with an unknown-unit error that names the first eight symbols it accepts and then trails off, rather than printing the whole list; Unit Converter covers ten quantities in one box. And nm means nanometre here, with nmi for the nautical mile, which is worth remembering before a sea distance comes back in billionths of a metre. The work happens in this browser tab: the numbers you type are not uploaded anywhere, and once the page has loaded it keeps converting with the network switched off.

How to use it

  1. Type the measurements. One per line: 12, or 10 km to mi, or 1 1/2 ft to in, or 6'2" to cm. Load sample fills the box with a set of those forms to try.
  2. Set From and To, or name the unit on the line. The two dropdowns supply the units for any line that leaves them out. A unit typed after the number overrides From, and a to clause overrides To.
  3. Choose how many digits. Automatic gives ten significant digits and drops the trailing zeros. Fixed rounding to 0, 1, 2, 3, 4, 6 or 8 decimals sits on the same menu.
  4. Read the result, or ask for every unit. Each line comes back as input = result. A single formula line closes the output, giving the factor for the last single-unit pair converted rather than one per line. Switching To to All units (table) lists the value in all sixteen units.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Reading a spec sheet written the other way round

Screens, timber and pipework are quoted in inches while the drawing is metric. Converting cm to inches removes the mental factor of 2.54 from every line.

Filling in your height on a form

5 ft 6 in to cm gives 167.64 cm, which is the figure a European medical, visa or gym form is asking for when the number you know is imperial.

Converting a pasted column of readings

Measurements copied out of a spreadsheet drop in as many lines and each is converted on its own, so a hundred readings take one pass instead of a hundred.

Settling a distance

10 km to mi answers a race distance; nautical miles are in the same table for a chart, and furlongs for a racecard, without changing tools.

Judging an unfamiliar scale

All units (table) shows one figure as nanometres through parsecs at once, which is the quickest way to see what a light-year is in kilometres.

Questions

Do the measurements I type leave this tab?
No. The conversion is JavaScript running inside the page, so the numbers never reach a server and nothing about them is logged. Once the tab has loaded, it carries on converting with the network disconnected — though the page itself still has to be fetched first.
Can I type feet and inches together?
Yes. 6'2", 6' 2", 5 ft 6 in and a bare 74" are all recognised. The pair is folded into decimal feet before conversion, which is why your input is echoed back in decimal feet rather than as the two numbers you typed.
Can it answer in feet and inches?
No. Results are always a single unit as a decimal, so 187.96 cm comes back as 6.166666667 ft and the fractional part has to be multiplied by 12 by hand. Composite output is the one thing this converter does not do.
Does nm mean nautical mile?
No — nm is the nanometre. The nautical mile is nmi, so a sea distance typed as nm is converted as billionths of a metre and the answer will look nothing like the one you wanted.
Can I convert kilograms or square metres on this page?
No. Only length units are accepted, and anything else is rejected with an error that quotes the first eight length symbols before an ellipsis. Unit Converter handles ten quantities in one box, and Weight Converter and Area Converter are the dedicated pages.
Why is my answer written as 1e-12?
Automatic precision switches to exponential notation below a millionth and from 10^15 upwards, because a nanometre expressed in kilometres has twelve leading zeros. Those exponential answers carry eight significant digits, not ten. Choosing fixed decimals will not spell such a number out either: 1e-12 rounded to 8 decimals is 0.00000000.
How exact are the results?
The factors are the defined ones, and the sums are done in double-precision floating point. That is why automatic precision stops at ten significant digits in the decimal range — past that you would be reading binary rounding rather than the measurement.

Related tools