The All-in-One Unit Converter
This free unit converter covers 10 measurement categories and over 100 individual units. Unlike converters that show only one result at a time, ours displays every unit in the chosen category simultaneously — so you can see all conversions at a glance and click any result to copy it instantly.
Categories
- 📏 Length — km, m, cm, mm, mile, yard, foot, inch, nautical mile, light year
- ⚖️ Weight / Mass — metric ton, kg, g, mg, lb, oz, stone, US ton
- 🌡️ Temperature — Celsius, Fahrenheit, Kelvin, Rankine
- ⬜ Area — km², m², cm², hectare, acre, sq. mile, sq. foot
- 🧪 Volume — m³, L, mL, US gallon, pint, cup, fl oz, tablespoon, imp. gallon
- 💨 Speed — m/s, km/h, mph, knot, Mach, speed of light
- ⏱️ Time — year, month, week, day, hour, minute, second, millisecond
- 💾 Data Storage — bit, byte, KB, MB, GB, TB, PB, KiB, MiB, GiB
- ⚡ Energy — joule, kJ, calorie, kcal, kWh, BTU, electronvolt
- 🔵 Pressure — Pa, kPa, bar, atm, Torr, PSI, mmHg
How to Use the Unit Converter
Swap Button
The ⇅ swap button between the two fields reverses the From and To units and transfers the output value back to the input — useful for quick round-trip checks.
Behind the Scenes
All conversions run entirely in your browser using JavaScript. No data is sent to any server.
Factor-based conversion: Every unit stores a multiplication factor relative to a base unit for that category (e.g. for Length, the base is meter). To convert from Unit A to Unit B: multiply by A's factor to get the base value, then divide by B's factor.
Temperature uses custom formulas instead of factors (since Celsius ↔ Fahrenheit involves an additive offset). All four scales (°C, °F, K, °R) are handled via dedicated toCelsius / fromCelsius functions.
Smart formatting: Very large and very small numbers (e.g. light-years to nanometers) are shown in scientific notation to avoid overflow. Values between those extremes use up to 8 significant figures.
Alpine.js reactivity: The outputVal and allResults are computed getters — they recalculate instantly on every keystroke or unit change.
Who Needs a Unit Converter?
- Travellers — Convert miles ↔ kilometres, Fahrenheit ↔ Celsius, gallons ↔ litres when crossing between metric and imperial countries.
- Students & scientists — Convert between SI units (Pa, J, m/s) and practical units (atm, kcal, mph) for physics and chemistry problems.
- Developers & IT — Convert between bit, byte, KB, MB, GB, TB instantly when estimating storage or bandwidth requirements.
- Cooks & bakers — Convert cups to mL, tablespoons to grams, Fahrenheit to Celsius for oven temperatures.
- Engineers — Convert pressure (PSI ↔ bar ↔ kPa), energy (kWh ↔ BTU), speed (m/s ↔ mph) in technical documents.
- E-commerce & import/export — Convert weights (kg ↔ lbs), dimensions (cm ↔ inches) for product listings across markets.