Unit Converter
Convert length, mass, temperature, volume, area, data storage, and speed using convert-units. locally in your browser.
Interactive tool
Accurate conversion
This tool uses the convert units library definitions for metric and imperial anchors. Handy for engineering, cooking, travel, and understanding US vs SI units.
How to use
- 1Pick a category.
- 2Enter a number.
- 3Select source and target units, then convert.
Key features
Many measures
Length through speed categories in one interface.
On device
No server round trip; good for offline capable PWA use.
Why not search engines?
Search snippets round oddly. Explicit unit keys reduce mistakes when you need repeatable numbers.
Common use cases
- Recipe scaling across volume units
- Mapping running pace or wind speeds
- Storage sizing (MB vs MiB style via library definitions)
Most conversions are exact, not approximate
- People treat imperial to metric as a rounding exercise, and for the units that matter it is not. An inch has been defined as exactly 25.4 millimetres since 1959, which makes a foot exactly 0.3048 m and a mile exactly 1609.344 m. A pound is exactly 0.45359237 kg.
- That matters when conversions are chained. Converting inches to centimetres to metres and back should return the number you started with, and it will if the factors are exact and the arithmetic is done at full precision. Rounding at each step is what introduces drift.
- This converter keeps full double precision throughout and rounds only for display, so the value you copy is the value it computed rather than a rounded intermediate.
The units that catch people out
- Gallons. A US gallon is 3.785 L and an imperial gallon is 4.546 L, a 20% difference, so fuel economy figures are not comparable across the Atlantic without saying which gallon.
- Tons. A US short ton is 2000 lb, a UK long ton is 2240 lb, and a metric tonne is 1000 kg. All three are called a ton in ordinary speech.
- Fluid ounces. The US fluid ounce is about 29.57 mL and the imperial one about 28.41 mL, and unlike the gallon the difference goes the other way.
- Temperature is the odd one out because it has an offset as well as a scale, so a temperature difference converts differently from a temperature. A rise of 10 degrees C is a rise of 18 degrees F, not 50.
Conversion table of exact factors
Every factor below is exact by definition rather than measured, so these are the values to use when precision matters.
| From | To | Exact factor |
|---|---|---|
| 1 inch | millimetres | 25.4 |
| 1 foot | metres | 0.3048 |
| 1 yard | metres | 0.9144 |
| 1 mile | metres | 1609.344 |
| 1 nautical mile | metres | 1852 |
| 1 pound | kilograms | 0.45359237 |
| 1 ounce | grams | 28.349523125 |
| 1 US gallon | litres | 3.785411784 |
| 1 imperial gallon | litres | 4.54609 |
| 1 acre | square metres | 4046.8564224 |
Temperature is not in the table because it needs an offset as well as a factor: degrees F equals degrees C times 9/5 plus 32.
Tips & best practices
Temperature
Uses C, F, and K keys as defined by convert units.
Speed
Road speeds often use m/h (mph) vs km/h in this library.
Privacy & security
All math runs in your browser.
Related tools
- QR Code Generator
Create QR codes for URLs, text, and more. Customize size and colors. Download PNG.
Utilities
- Color Picker & Converter
Convert HEX, RGB, HSL, and CMYK. Check WCAG contrast between two colors.
Utilities
- Color Contrast Checker
Check WCAG 2.1 AA and AAA color contrast ratios for text and UI components, with live preview and accessible color suggestions
Utilities
- Percentage Calculator
Calculate percentages with seven modes: percent of, what percent of, increase/decrease, add/subtract percent, and percent difference
Utilities
- Video Format Converter
Convert mp4, webm, mkv, and mov videos to any of those targets: fully in your browser via ffmpeg.wasm. Pick the container; we auto-pair the right H.264 / VP9 / passthrough codec for maximum playback compatibility.
Video Tools
- Audio Trimmer
Trim mp3, aac, ogg, opus, wav, and flac audio in your browser with ffmpeg.wasm. Drag the waveform thumbs to set start and end, add optional fade-in / fade-out, and keep the source format. No upload, no signup.
Audio Tools
Frequently Asked Questions
Are conversions exact?
They use convert-units anchors; floating rounding may appear; treat as practical precision.
Binary vs decimal kilobytes?
This library uses standard definitions bundled with convert-units.
Why did my pair fail?
Units must belong to the same measure; pick both from the same category.
Offline?
After load, conversions work without network.
More units?
The library supports more keys than listed; we expose common presets.
Are imperial to metric conversions exact?
For the units that matter, yes. An inch is defined as exactly 25.4 millimetres and a pound as exactly 0.45359237 kilograms, so these are definitions rather than measurements. The table above lists the exact factors, and this converter carries full precision and rounds only for display.
What is the difference between a US and an imperial gallon?
A US gallon is 3.785 litres and an imperial gallon is 4.546 litres, so the imperial one is about 20% larger. Fuel economy in miles per gallon is therefore not comparable between the two without saying which gallon is meant.
Why does a temperature difference convert differently?
Because the Fahrenheit and Celsius scales have different zero points as well as different step sizes. A temperature of 10 degrees C is 50 degrees F, but a rise of 10 degrees C is a rise of 18 degrees F. Convert the temperatures, then subtract, rather than converting the difference.