Home › Unit Converters › Number Base Converter

Number Base Converter

Type a number, choose the base it is in and the base you want, and get the exact result instantly, plus binary, octal, decimal and hex side by side. Works with integers of any size, negative numbers and fractional parts, and shows the division and multiplication steps.

Last updated:

Result
Step-by-step conversion
Advertisement
Advertisement

How to use the Number Base Converter

  1. Type the number you want to convert. You can use a minus sign and a dot for the fractional part; spaces and underscores are ignored.
  2. Choose the From base the number is written in and the To base you want. Use ⇄ to swap them.
  3. Read the result and the quick binary, octal, decimal and hex panel. A ≈ sign means the fraction was cut off at the chosen precision.
  4. Open the steps to see how the conversion is done by hand, then press Copy result.

Common bases and their digits

BaseNameDigits255 written in this baseWhere you see it
2Binary0 111111111Bits, logic, networking masks
8Octal0–7377Unix file permissions (chmod 755)
10Decimal0–9255Everyday numbers
12Duodecimal0–9, A, B193Dozens, clocks, imperial units
16Hexadecimal0–9, A–FFFColours (#FF8800), memory addresses, byte dumps
32Base 320–9, A–V7VCompact identifiers (this is the numeric "base32hex" alphabet, not RFC 4648 Base32 encoding)
36Base 360–9, A–Z73Short IDs and URL shorteners, case-insensitive codes

Worked example: 10.625 to binary

Integer part 10: 10 ÷ 2 = 5 r 0; 5 ÷ 2 = 2 r 1; 2 ÷ 2 = 1 r 0; 1 ÷ 2 = 0 r 1. Reading the remainders upward gives 1010.

Fractional part 0.625: 0.625 × 2 = 1.25 → 1; 0.25 × 2 = 0.5 → 0; 0.5 × 2 = 1.0 → 1. The fraction is now 0, so it stops: .101.

So 10.62510 = 1010.1012. Check: 8 + 2 + 0.5 + 0.125 = 10.625.

Shortcuts between binary, octal and hex

Because 8 = 23 and 16 = 24, you can convert without going through decimal. Group binary digits in threes for octal or fours for hex, starting from the point (pad with zeros at the ends), and replace each group with one digit:

Hex0123456789ABCDEF
Binary0000000100100011010001010110011110001001101010111100110111101111

Example: 1011 01102 = B616, and 10 110 1102 = 2668. Tick Group digits to see the groups in the results.

When does a fraction terminate?

Write the fraction in lowest terms. It has a finite expansion in base b only if every prime factor of the denominator also divides b. Base 10 has the primes 2 and 5, so 1/8 = 0.125 ends but 1/3 = 0.333… does not. Base 2 only has 2, so 0.1 (1/10) repeats as 0.0(0011) in binary, which is why 0.1 + 0.2 is not exactly 0.3 in floating-point arithmetic. Base 12 has 2 and 3, so 1/3 is simply 0.4 in duodecimal.

Frequently asked questions

How do I convert a decimal number to binary?

Divide the number by 2 again and again and write down each remainder; reading the remainders from the last to the first gives the binary digits. For example 13 ÷ 2 gives remainders 1, 0, 1, 1, so 13 is 1101 in binary. The steps panel shows this for any number and base.

How are fractional parts converted?

Multiply the fractional part by the target base repeatedly. The whole-number part of each product is the next digit after the point. For 0.625 to binary: 0.625 × 2 = 1.25 (digit 1), 0.25 × 2 = 0.5 (digit 0), 0.5 × 2 = 1 (digit 1), so 0.625 = 0.101 in binary.

Why does 0.1 in decimal become a never-ending binary number?

A fraction ends in a base only if its denominator, in lowest terms, has no prime factors other than those of the base. 0.1 is 1/10 and 10 contains the factor 5, which 2 does not, so in binary it repeats forever: 0.0001100110011… The converter shows ≈ and the repeating block.

What digits are used for bases above 10?

Letters continue after 9: A = 10, B = 11 and so on up to Z = 35, which is why 36 is the largest base that can be written with 0–9 and A–Z. Letters are not case-sensitive in the input.

Is there a size limit?

Integer parts can be as long as you like because the converter uses exact big-integer arithmetic, so a 200-digit decimal number converts exactly. Fractional output is limited by the precision setting (up to 500 digits).

How are negative numbers handled?

The minus sign is kept and the magnitude is converted, so -255 in decimal is -FF in hex. This is the mathematical (sign-magnitude) form, not the two's complement bit pattern a computer uses for signed integers.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Binary TranslatorConvert text to binary, hex, octal and back.Roman Numeral ConverterConvert numbers to Roman numerals and back, up to 3,999,999.Number to WordsWrite any number in words, including cheque format.Unit ConverterConvert length, weight, volume, temperature and more.Antilog CalculatorInverse logarithm (antilog) in base 10, e, 2 or any base, with steps and scientific notation.Audio Sample Rate ConverterResample audio to any rate from 8 to 96 kHz and change bit depth. WAV or MP3 output.Big Number CalculatorExact + − × ÷ mod and powers for huge integers with hundreds of digits, plus digit count.Binary CalculatorAdd, subtract, multiply, divide, AND, OR, XOR and shift binary numbers with decimal values.Currency ConverterConvert currencies with live exchange rates.Temperature ConverterConvert °C, °F, K, °R and °Ré at once. Type in any field, with formulas and a range table.KG to LBSConvert kilograms to pounds and back.CM to FeetConvert centimeters to feet and back.CM to InchesConvert centimeters to inches and back.Inches to FeetConvert inches to feet (in to ft) instantly, with formula and chart.Celsius to FahrenheitConvert temperatures between °C and °F.Fahrenheit to CelsiusConvert temperatures from °F to °C and back.ML to OZConvert milliliters to US or UK fluid ounces.OZ to MLConvert fluid ounces to milliliters and back.Height to CMConvert height in feet and inches to centimeters.LBS to KGConvert pounds to kilograms and back.Inches to CMConvert inches, including fractions, to centimeters.MPH to km/hConvert miles per hour to kilometers per hour.Square Feet to Square MetersConvert ft² to m² and back, with a room area helper.Watts to AmpsConvert watts to amps at any voltage, DC or AC.Mbps to MB per SecondConvert internet speed from Mbps to MB/s and back.KM to MilesConvert kilometers to miles.Miles to KMConvert miles to kilometers.Feet to MetersConvert feet to meters and back.Meters to FeetConvert meters to feet and back.Words to NumberConvert written English number words back into digits.Ordinal Number GeneratorTurn numbers or ranges into ordinals like 1st, 2nd, 3rd or first.Time Zone Abbreviations & UTC OffsetsLook up time zone abbreviations like EST, CET or IST and their UTC offsets.Shoe Size ConverterConvert US, UK, EU and JP shoe sizes for men, women and kids, or size from foot length.Clothing Size ConverterConvert women's, men's and kids' clothing sizes between US, UK, EU, IT, FR, JP and AU.Ring Size ConverterConvert US, UK, EU and JP ring sizes, find a size from diameter, and print a ring sizer.Bra Size CalculatorFind your bra size from two measurements and convert it between US, UK, EU, FR and AU sizes.Paper Size ReferenceA, B, C, US and ANSI paper sizes in mm, inches, points and pixels at any DPI, with a visual compare.Pixels to Inches ConverterConvert pixels to inches, cm and mm at any DPI, find print sizes and calculate screen PPI.Gold Karat Purity ConverterConvert gold karat to purity percent and fineness (585, 750, 916) and back, plus gold weight.KG to LitersConvert kilograms to liters for water, milk, oils, fuels, honey, sand or a custom density.kWh to kWConvert kWh used over any time period into average power in kW for bills, batteries and solar.Lat Long to UTMConvert latitude/longitude (decimal or DMS) to UTM zone, easting and northing, one or in bulk.Liters to KGConvert liters to kilograms for water, milk, oils, fuels, honey, concrete or a custom density.Miles to StepsConvert miles to steps from your height or step length, for walking or running.MM to Fraction InchesConvert millimeters to the nearest fractional inch (1/2 to 1/64) with error and a chart.Pounds to CupsConvert pounds of flour, sugar, butter, rice, oats and more to US cups.Pounds to GallonsConvert pounds of water, milk, fuel, honey or propane to US gallons, or use a custom density.PX to CMConvert pixels to centimeters at any DPI (72, 96, 150, 300) with print-size presets.PX to DPConvert pixels to Android dp and sp for ldpi–xxxhdpi, plus iOS points, and back.Steps to KMConvert steps to kilometers from your height or step length, for walking or running.Tons to Cubic YardsConvert tons of gravel, sand, topsoil, mulch, limestone or asphalt to cubic yards.UTM to Lat LongConvert UTM zone, easting and northing (WGS84) to latitude/longitude in decimal and DMS, or a CSV batch.Viscosity ConverterConvert cP, Pa·s, poise, cSt, m²/s and SUS, with density linking dynamic and kinematic.Engineering Notation ConverterConvert numbers to engineering notation with SI prefix, scientific notation and standard form.Excel Column Letter to NumberConvert spreadsheet column letters (A, AA, XFD) to numbers and back, one or many at once.Improper Fraction to Mixed NumberTurn improper fractions into simplified mixed numbers with long division and a bar model.Lumens to LuxConvert lumens to lux and foot-candles from an area or from beam angle and distance.Lumens to WattsFind how many watts you need for a given number of lumens with LED, CFL, halogen or incandescent bulbs.Men's Suit Size ConverterConvert men's suit and blazer sizes between US/UK, EU and Italian from chest, height and drop.PPM to PercentConvert ppm to percent, ppb, ppt and mg/L, or percent back to ppm, with steps.Radiation Dose ConverterConvert Sv, mSv, rem, Gy, rad, roentgen, becquerel, curie and dpm, with dose references.Volts to AmpsConvert volts to amps from watts (I = P/V) or ohms (I = V/R), for DC, single- and three-phase AC.Fraction to Decimal CalculatorConvert fractions and mixed numbers to exact decimals with repeating digits and percent.Decimal to Fraction CalculatorTurn decimals and repeating decimals into simplified fractions and mixed numbers.Feet to InchesConvert feet to inches (ft to in) instantly, with formula and chart.MM to InchesConvert millimeters to inches (mm to in) instantly, with formula and chart.Inches to MMConvert inches to millimeters (in to mm) instantly, with formula and chart.Feet to CMConvert feet to centimeters (ft to cm) instantly, with formula and chart.
See all 366 Unit Converter Tools →