Unit Converter: Length, Weight, Temp
Unit converter for length, weight, temperature, volume, area, speed, and data. Metric and imperial support. Free online measurement tool.
What Is Unit Converter?
The Unit Converter is a free, browser-based tool for converting measurements across 7 categories: length, weight, temperature, volume, area, speed, and data storage. It works as a length converter, weight converter, temperature converter, and metric converter all in one, covering both metric and imperial units (from millimeters to miles, milligrams to metric tons, Celsius to Kelvin) with hundreds of unit combinations available. Type a value, pick source and target units from dropdowns, and the result appears instantly. A swap button reverses the direction without retyping. All calculations run locally in JavaScript with no server calls or account requirements.
Key Features
- 7 conversion categories: Length, Weight, Temperature, Volume, Area, Speed, and Data, accessible via tab navigation.
- Length units: mm, cm, m, km, inch, foot, yard, mile, nautical mile.
- Weight units: mg, g, kg, oz, lb, stone, metric ton, US ton.
- Temperature: Celsius, Fahrenheit, Kelvin, handled with the correct non-linear formula (not a simple multiplication factor).
- Volume: mL, L, m³, fluid ounce (US), cup (US), pint (US), quart (US), gallon (US), gallon (Imperial).
- Area: mm², cm², m², km², ft², yd², acre, hectare.
- Speed: m/s, km/h, mph, ft/s, knot.
- Data storage: bit, byte, KB (SI), KiB, MB (SI), MiB, GB (SI), GiB, TB (SI), TiB, covering both SI (powers of 10) and binary (powers of 2) units.
- Swap button: Reverses from/to units instantly with one click.
- Conversion formula display: Shows the full equation in the format
1 kg = 2.20462 lbbelow the result. - Copy result: One-click clipboard copy of the output value.
- Quick reference card: Hardcoded common conversions for length, weight, and temperature always visible on the page.
- 100% client-side processing: No measurement data is sent to any server.
How to Use Unit Converter
Step 1: Select a category
Navigate to the Coming Soon: Unit Converter. Seven tab buttons appear at the top: Length, Weight, Temperature, Volume, Area, Speed, Data. Click the tab for your conversion category. Changing tabs resets the from/to selectors to sensible defaults (for example, Length defaults to meters → feet).
Step 2: Choose source and target units
Use the From dropdown to select your input unit and the To dropdown to select your output unit. Each dropdown lists all units in the category with full names and symbols, e.g., "Kilogram (kg)".
Step 3: Enter a value
Type a number into the input field under the From dropdown. Results update as you type. For example, entering 100 with Length set from km to mile displays 62.1371 in the result field. Below the fields, the conversion formula reads: 100 km = 62.1371 mi.
Step 4: Swap direction
Click the arrow-swap button between the two columns to reverse the conversion direction. The from and to units exchange places. Your typed value stays in the input field, and the result recalculates for the reversed direction.
Step 5: Copy the result
Click the copy icon next to the result field. The formatted number is copied to your clipboard. For very small or very large results (below 0.000001 or above 1,000,000,000), the output switches to scientific notation with 6 significant figures.
Practical Examples
Converting a recipe from US to metric
A recipe calls for 2 cups of flour and 1 pint of milk. Switch to the Volume tab. Select Cup (US) → Milliliter and enter 2 to get 473.18 mL. Then select Pint (US) → Milliliter and enter 1 to get 473.18 mL. Both measurements happen to be identical here, a useful sanity check.
Checking a marathon distance
You want to know how many kilometers a marathon (26.2 miles) is. Select the Length tab, set mph → km (or mile → km), enter 26.2. The result is 42.165 km, which matches the official marathon distance of 42.195 km. The small discrepancy is because 26.2 miles is a rounded figure.
Understanding a file size specification
A cloud storage provider specifies a 10 GiB (gibibyte) file limit. You want to know the megabyte (SI) equivalent. Select the Data tab, set GiB → MB, enter 10. The result is 10,737.4 MB (about 10.7 GB), illustrating the difference between binary and SI prefixes.
Converting body weight for a medical form
A patient weighs 185 lb and the form requires kilograms. Select the Weight tab, set lb → kg, enter 185. The result is 83.915 kg. Use the copy button to paste the value directly into the form.
Tips and Best Practices
Temperature conversions use a separate calculation path because they are not simple proportional conversions. The tool first converts any input to Celsius, then converts Celsius to the target, so Fahrenheit-to-Kelvin goes through two steps internally. This guarantees accuracy that a simple multiplication factor would not provide.
For data storage, pay attention to whether you are using SI (KB, MB, GB) or binary (KiB, MiB, GiB) units. 1 MB = 1,000,000 bytes while 1 MiB = 1,048,576 bytes. Storage manufacturers typically use SI; operating systems often report in binary. The tool provides both options explicitly.
The result field uses toLocaleString('en-US', { maximumFractionDigits: 8 }) for display, which adds thousands separators. This means 1000000 mm shows as 1,000 m rather than 1000 m. When copying the result, you copy the formatted string including commas, so strip commas before using the value in code.
When a result is very small (below 0.000001) or very large (above 1,000,000,000), the output switches to scientific notation: 1.2e-7 for example. This prevents the field from overflowing with leading zeros.
Common Issues and Troubleshooting
Result field is empty: The result field only shows a value when the input field contains a valid number. Letters, symbols, or an empty string leave the result blank. Clear the input and retype a numeric value.
Switching category resets my units: This is by design. Each category tab resets to default units (e.g., meters → feet for Length) when selected. If you need to maintain a specific unit pair, set the dropdowns again after switching.
Swap button doesn't swap the value: The swap button exchanges the from/to unit selectors only. Your typed input value stays in the input field and recalculates for the new direction. It does not move the result value into the input field.
Nautical mile not showing for some distance categories: Nautical mile (nmi) appears only in the Length category. It does not appear in Area or Speed even though knots are speed units. Check the Speed tab for knots specifically.
Data units showing unexpected values: Double-check whether you selected SI (KB, MB, GB) or binary (KiB, MiB, GiB). A 1 GB → 1 GiB conversion yields 0.931323 GiB because 1 billion bytes ÷ 1,073,741,824 bytes/GiB ≈ 0.931.
Privacy and Security
The Unit Converter calculates all results locally in your browser. No measurement values, unit selections, or results are transmitted to any server. The conversion factors are hardcoded constants in the JavaScript source. The tool works offline after initial page load and has no network calls after the initial asset download. It is safe for converting sensitive or confidential measurements such as classified dimensions or proprietary material properties.
Frequently Asked Questions
Is Unit Converter free to use?
Yes, fully free with no account required and no usage limits. All 7 categories and all unit combinations are available without any cost.
Does Unit Converter work offline?
Once the page has loaded, the Unit Converter works completely offline. All conversion logic is embedded in the JavaScript bundle and requires no server communication.
Is my data safe with Unit Converter?
All calculations run in your browser. No values you enter are sent to any server. The tool is safe for converting sensitive measurements in professional or confidential contexts.
How does the temperature conversion work?
Temperature does not convert via a simple multiplication factor. The tool first converts the input to Celsius (subtracting 32 and multiplying by 5/9 for Fahrenheit, or subtracting 273.15 for Kelvin), then converts Celsius to the target unit. The formula display shows this: °F = °C × 9/5 + 32 and K = °C + 273.15.
What is the difference between KB and KiB?
KB (kilobyte) in the SI definition equals 1,000 bytes. KiB (kibibyte) in the IEC definition equals 1,024 bytes. The tool provides both. Hard drive manufacturers typically use SI; operating systems and memory typically use binary. The difference becomes significant at large scales: 1 TB = 1 trillion bytes, but 1 TiB = 1,099,511,627,776 bytes.
Can I convert between speed units like Mach number?
The current Speed category covers m/s, km/h, mph, ft/s, and knots. Mach number is not included because Mach varies with altitude and air temperature and cannot be represented as a fixed conversion factor.
How many decimal places does the result show?
The result displays up to 8 decimal places using maximumFractionDigits: 8. Very precise inputs like 1 inch → mm yield 25.4 exactly. For very small or very large numbers, the tool switches to scientific notation (6 significant figures in exponential form) to keep the result readable.
Does the tool support stone for body weight?
Yes. Stone (st) is included in the Weight category with a conversion factor of 6,350.29 grams per stone. This is the unit commonly used for body weight in the UK and Ireland.
Why are there two gallon options?
The US gallon (3.78541 liters) and the Imperial gallon (4.54609 liters) differ by about 20%. The tool lists both explicitly (US gallon labeled "Gallon (US)" and Imperial labeled "Gallon (Imperial)") to prevent confusion in recipes, fuel calculations, and engineering specs.
Can I use the result in a code snippet directly?
Copy the result, then strip any thousands separator commas before pasting into code. The display value includes locale formatting (1,000,000) which is not valid as a JavaScript or Python numeric literal. The scientific notation form (1e+6) is valid in most languages.
Try Unit Converter now: Coming Soon: Unit Converter
Related Tools
- Coming Soon: Number Converter: Convert numbers between binary, octal, decimal, and hexadecimal, useful when dealing with data size values in different bases.
- Coming Soon: Aspect Ratio Calculator: Calculate image and video dimensions with presets for common screen resolutions.