Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

Unit Converter

Convert between common units of length, mass, temperature, area, volume, speed, pressure, energy, power, time, data, angle and frequency, from millimeters to light-years. Pick a unit, type a value and read the result with as many decimals as you want.

Everything runs locally in your browser. Your data never leaves your device.

km

1 km is

0.62137mi

In every length unit

1 km expressed in the other units it can convert to.

Nanometer
999,999,999,999.9999nm
Micrometer
1,000,000,000µm
Millimeter
1,000,000mm
Centimeter
100,000cm
Meter
1,000m
Inch
39,370.07874in
Foot
3,280.8399ft
Yard
1,093.6133yd
Mile
0.62137mi
Nautical mile
0.53996nmi
Astronomical unit
6.68459e-9au
Light-year
1.05700e-13ly
Parsec
3.24078e-14pc

About the Unit Converter Tool

This tool converts a value from one unit to another. Pick the unit you have, type the value, pick the unit you want and read the result. It covers length, mass, temperature, area, volume, speed, pressure, energy, power, time, data, angle and frequency.

The target list only ever shows units the source can actually convert to, so you cannot ask for kilometers in bar. The result shows 5 decimals by default, and a small input lets you raise or lower that.

What you can do

  • Convert metric to imperial and back, like km to miles or kg to pounds.
  • Convert temperatures between Celsius, Fahrenheit and Kelvin.
  • Convert pressure between bar, psi, atm, pascal and torr.
  • Convert digital storage between bits, bytes, and decimal or binary multiples.
  • Convert astronomical lengths like light-years, astronomical units and parsecs.
  • Choose how many decimals the result shows.
  • Swap the two units with one click.

How to use the Unit Converter

  1. 1Pick the unit you are converting from. Units are grouped by what they measure.
  2. 2Type the value.
  3. 3Pick the unit you want. Only compatible units are offered.
  4. 4Read the result, adjust the decimals if you need more or fewer, and copy it.

Notes on specific units

Data units come in both flavours: decimal ones like kilobyte and megabyte are powers of 1000, and binary ones like kibibyte and mebibyte are powers of 1024. A month is treated as the average Gregorian month and a year as 365.25 days. Fluid ounces, cups, pints, quarts and gallons are the US measures, with the imperial gallon listed separately.

Convert between px, rem, em, percent, pt and viewport units with a configurable root font size. Type into any field and the others update as you go, set the parent font size for em math, and read a conversion table for common sizes.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

Convert between scientific notation and full numbers as you type. Reads 1.23e5, 1.23 × 10^5 and plain numbers, shows the value written out, in normalized scientific notation and in engineering notation, and can round to any number of significant digits.

Enter a resolution to get its simplified aspect ratio, or start from a ratio and one side to get the missing dimension. Knows the common ratios like 16:9, 4:3 and 21:9 and shows how close your size is to each.

Convert audio files between MP3, WAV, OGG, FLAC and M4A. Drop in as many files as you like, pick the target format and bitrate, and download the results one by one or all at once.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.