Unit Converter
Length, Weight, Data & More
Type in any unit and every other one updates. Converts length, weight, temperature, data size, time, speed, area, volume and CSS units with exact conversion factors, and keeps decimal KB and binary KiB clearly apart. Share a conversion as a link. 100% client-side. Zero data stored.
Unit Converter Tool
Convert
Result
Every unit at once
Type in any box. The others follow.
Common Use Cases
Travel and distances
Turn miles into kilometers, miles per hour into kilometers per hour, and Fahrenheit into Celsius before a trip, so road signs and forecasts make sense.
Cooking and recipes
Convert cups, tablespoons and fluid ounces to milliliters, ounces and pounds to grams, and an oven setting from Fahrenheit to Celsius.
Storage and bandwidth
See why a 500 GB drive shows as about 465.66 GiB, and how many megabytes a gigabit link moves in a second, with decimal and binary units kept apart.
Property and projects
Compare acres, hectares and square feet, work out how many square meters a room is, or size a garden bed from inches into centimeters.
CSS and design
Move between px, rem, em and pt against any base font size. For a full CSS tool with a size scale, use the REM Converter.
Homework and science
Check a hand calculation with exact factors, such as 1 inch = 25.4 mm and 0 degrees C = 32 degrees F = 273.15 K, and see every other unit at the same time.
Exact Definitions Behind Every Answer
Length
The meter is the base. 1 inch = 0.0254 m exactly, 1 foot = 12 in = 0.3048 m, 1 yard = 0.9144 m, 1 mile = 5,280 ft = 1,609.344 m, and 1 nautical mile = 1,852 m. These are fixed by international agreement, not measured, so the answers are exact.
Weight and mass
The kilogram is the base. 1 pound = 0.45359237 kg exactly, 1 ounce = 1/16 lb, 1 stone = 14 lb, and 1 US short ton = 2,000 lb. A metric ton is 1,000 kg. Strictly, a scale measures weight and these units measure mass, which is what everyday use means.
Temperature
By formula, with Celsius as the pivot. F = C x 9/5 + 32, K = C + 273.15, and Rankine = (C + 273.15) x 9/5. The scales meet at -40: minus 40 degrees C is minus 40 degrees F. A temperature difference converts without the offset, which this tool does not do.
Data size: decimal versus binary
Decimal prefixes are powers of 1,000: 1 KB = 1,000 B, 1 MB = 1,000,000 B, 1 GB = 10^9 B. Binary prefixes are powers of 1,024: 1 KiB = 1,024 B, 1 MiB = 1,048,576 B, 1 GiB = 1,073,741,824 B. 8 bits make 1 byte. Lowercase b is a bit and uppercase B is a byte.
Time, speed, area and volume
A day is 86,400 s and a year is 365.25 days. 1 knot = 1,852 m per hour. 1 acre = 43,560 square feet = 4,046.8564224 m2. 1 US gallon = 231 cubic inches = 3.785411784 L, and the imperial gallon is 4.54609 L. Months are left out because they have no fixed length.
CSS units
1 in = 96 px by the CSS definition, so 1 pt = 96/72 px and 12 pt = 16 px. rem and em both multiply by the base font size you set, 16 px by default. In real CSS an em follows the parent element's size, so set the base to that size. See the REM Converter for a full CSS tool.
Quick Check Values
| Convert | Result | Note |
|---|---|---|
| 1 mi | 1,609.344 m | Exact |
| 1 lb | 0.45359237 kg | Exact |
| 1 in | 25.4 mm | Exact |
| -40 °C | -40 °F | The one point where both scales agree |
| 1 GiB | 1,073,741,824 B | About 1.074 GB |
| 26.2 mi | 42.16 km | A marathon is 42.195 km, which is 26.219 mi |
Pro Tip: URL Parameters
Link straight to a conversion with /unit-converter/?from=mi&to=km&value=26.2. from and to take a unit symbol such as mi, km, kg, lb, C, F, K, GiB, MB, mph, kmh, acre, gal or rem. The category is picked from from, value defaults to 1, and for CSS units base sets the base font size, as in ?from=rem&to=px&value=2&base=20.
The address bar updates as you convert, so "Copy link" gives you the same thing to bookmark or share.
Frequently Asked Questions
Pick a category tab, then type a number in the Value box and choose the From and To units, or type straight into any unit in the Every unit at once panel. All the other units update as you type, and Swap flips the pair.
Yes. Each factor comes from its legal or SI definition: 1 inch is exactly 0.0254 m, 1 pound is exactly 0.45359237 kg and 1 mile is exactly 1,609.344 m. Results show 10 significant digits by default, so the tiny rounding noise of computer arithmetic never appears, and you can fix the decimals yourself.
KB, MB and GB are decimal: each step is 1,000 times the last. KiB, MiB and GiB are binary: each step is 1,024 times the last. So 1 GB is 1,000,000,000 bytes but 1 GiB is 1,073,741,824 bytes, about 7.4 percent more. Drive makers use decimal, and many operating systems report in binary.
The maker counted in decimal gigabytes, 500,000,000,000 bytes, and some systems show the same bytes in binary gibibytes, which is about 465.66 GiB. Nothing is missing. Some of the rest goes to formatting and system files. Convert 500 GB to GiB here to check it.
Multiply by 9/5 and add 32, so 100 degrees C is 212 degrees F. Going back, subtract 32 and multiply by 5/9. Kelvin is Celsius plus 273.15. The two scales agree at minus 40, where -40 degrees C equals -40 degrees F.
No. A US gallon is 3.785411784 liters and an imperial (UK) gallon is 4.54609 liters, about 20 percent larger. The same goes for pints, quarts and fluid ounces. This tool treats cups, pints, quarts and gallons as US customary unless a unit is marked UK.
One point is 1/72 inch and CSS fixes 1 inch at 96 px, so 12 pt is 16 px. rem and em scale with a font size instead: with the usual 16 px base, 1 rem is 16 px. Change the base font size box to match your page. For a table of sizes and a Tailwind scale, use the REM Converter.
A calendar month is 28, 29, 30 or 31 days, so it has no single conversion factor and any answer would be a guess. The tool uses a day of 24 hours, a week of 7 days and a year of 365.25 days. For dates and epoch values, use the Timestamp Converter.
Add URL parameters, for example /unit-converter/?from=mi&to=km&value=26.2. The from and to parameters take a unit symbol, the category is chosen from from, value defaults to 1, and for CSS units base sets the base font size. The address bar updates as you convert, and Copy link copies the same address.
No. Every conversion is calculated in your browser with JavaScript. Nothing is uploaded, logged or saved, and the values you enter are gone when you close the page. The only thing that changes is the address bar, on your own device, so a link you copy can be shared.
Why We Built This Unit Converter
Almost everyone needs a unit conversion now and then, and the answer is usually one search away. The trouble is what you find: pages that give one number with no definition behind it, converters that bury the unit you want under thirty you do not, and storage tools that quietly blur kilobytes and kibibytes so a "1 GB" file and a "1 GiB" file look like the same thing. We wanted one page that handles the everyday categories properly and shows its working.
Every factor here comes from its definition: an inch is exactly 25.4 millimeters, a pound exactly 0.45359237 kilograms, a mile exactly 1,609.344 meters. Temperature is done by formula, not by a multiplier, so minus 40 comes out the same in Celsius and Fahrenheit. Decimal and binary data units sit in separate groups with their byte values spelled out. Type in any unit and all the others update, choose how many decimals you want, and copy the result or a link to it. Everything happens in your browser, so nothing you enter ever leaves your device.
The Unit Converter is part of RJL.io's collection of free developer tools. Work with CSS sizes in the REM Converter, convert dates and epoch values with the Timestamp Converter, line up meeting times across zones with the Time Zone Converter, or count the words in a draft with the Word Counter.