Number Base Converter screenshot Loading Number Base Converter…

How to Use Number Base Converter

New window

Number Base Converter rewrites a number from one base (radix) to another and shows the two steps of the method: first to decimal, then to the target base.

Number Base Converter converting 255.625 from decimal to binary
255.625 in decimal is 11111111.101 in binary

How to convert

  1. Type the number in From. Use digits 0–9 and letters A–Z for digit values 10–35 (upper or lower case). A point separates a fractional part, e.g. 1011.101 or FF.A.
  2. Choose its base: 2 (bin), 8 (oct), 10 (dec), 16 (hex) and other buttons, or type any base 2–36 in Other base. Digits not allowed in that base are reported.
  3. Choose the target base under To the same way. ⇅ Swap bases exchanges the two.
  4. Read the result with its base as a subscript. Copy copies it.
  5. Look at the table “The same number in other bases” for binary, octal, decimal, duodecimal, hexadecimal and base 36 together.
  6. Follow the steps: Step 1 writes the positional values; Step 2 shows repeated division for the whole part and repeated multiplication for the fraction.
Step tables of the conversion
Steps 1 and 2 of the conversion
Tip: the Quick conversions buttons set the usual pairs (dec→bin, bin→dec, dec→hex, hex→bin …) in one click.
Note: a fraction that terminates in one base may repeat in another (0.1₁₀ = 0.000110011…₂). The app shows up to 20 fractional digits and ends a cut-off result with “…”.

Theoretical Background

New window

Positional number systems

In base \(b\), a number with digits \(d_i\) (each \(0 \le d_i < b\)) has the value

$$ (d_n \dots d_1 d_0 . d_{-1} d_{-2} \dots)_b = \sum_{i} d_i \, b^{\,i} $$

Each place is worth \(b\) times the place to its right. Base 10 uses digits 0–9; base 2 uses 0 and 1; base 16 uses 0–9 and A–F (A = 10 … F = 15); base 36 uses all of 0–9 and A–Z.

Step 1 – to decimal

Multiply each digit by its place value and add:

$$ 11111111.101_2 = 2^7+2^6+\dots+2^0 + 2^{-1} + 2^{-3} = 255 + 0.5 + 0.125 = 255.625_{10} $$

Step 2 – from decimal to base b

Whole part: divide by \(b\) repeatedly; the remainders, read from the last to the first, are the digits.

Fractional part: multiply by \(b\) repeatedly; the whole parts, read from the first to the last, are the digits.

Worked example

Example

Convert 255.625₁₀ to binary.

DivisionQuotientRemainder
255 ÷ 21271
127 ÷ 2631
63 ÷ 2311
31 ÷ 2151
15 ÷ 271
7 ÷ 231
3 ÷ 211
1 ÷ 201

Whole part: 11111111. Fraction: 0.625 × 2 = 1.25 → 0.25 × 2 = 0.5 → 0.5 × 2 = 1.0 → .101.

Result: \(255.625_{10} = 11111111.101_2 = 377.5_8 = \mathrm{FF.A}_{16}\).

Shortcuts between 2, 8 and 16

Because \(8 = 2^3\) and \(16 = 2^4\), each octal digit is exactly three bits and each hexadecimal digit exactly four bits. Group the bits from the point outwards:

$$ 1111\,1111.1010_2 = \mathrm{F}\,\mathrm{F}.\mathrm{A}_{16}, \qquad 011\,111\,111.101_2 = 377.5_8 $$

Where bases are used

  • Binary – how computers store numbers and logic levels.
  • Hexadecimal – memory addresses, colour codes (#1B3A6B), byte values.
  • Octal – Unix file permissions (chmod 755).
  • Base 12 and 60 – dozens, hours and minutes, angles.
  • Base 36 – short IDs and URL codes using all letters and digits.

FAQ

Why does 0.1 not convert exactly to binary?

A fraction terminates in base b only if its denominator has no prime factors other than those of b. 1/10 has the factor 5, which 2 lacks, so its binary form repeats forever.

How large can the numbers be?

Whole parts are converted with exact big-integer arithmetic, so there is no practical size limit. Fractional parts are given to 20 digits.

Can I type lower-case hex?

Yes. ff, Ff and FF are the same number.

What is the largest base?

Base 36, because there are 10 digits and 26 letters to write the digit values 0–35.

Version history

  • 2.01 Dec 2026Rebuilt: any base from 2 to 36, numbers of any length, fractional parts, step-by-step tables both ways, all common bases at once, swap and copy.
  • 1.026 Oct 2024Improvements and fixes
  • 1.013 Mar 2024App added