How to Convert Between Number Bases

Learn binary, octal, decimal, and hex, bases 2–36, and a step-by-step method so you can convert number systems accurately.

By Generatr Team

Converting between number bases means rewriting the same quantity with a different place-value radix — binary (base 2), octal (8), decimal (10), hexadecimal (16), or any integer base from 2 through 36. Digits change; the value does not.

This guide covers the common bases, digits for bases above 10, and a step-by-step method for integers (and notes on fractions). Practice with the free number base converter — any radix 2–36, presets, optional steps, and fractional support in the browser.

Base conversion is place value, not a different “kind” of math. Once powers of the radix click, homework and low-level debugging get much easier. You stop memorizing isolated tricks and start reading any digit string against a stated base.

Free tool

Use the Number Base Converter now

Open the interactive number base converter in your browser — free, instant, no signup.

Open Number Base Converter

What Is a Number Base (Radix)?

A base (radix) is how many digit symbols a positional system uses before it carries to the next place. Decimal uses 10 symbols (0–9). Binary uses 2 (0–1). Each place is a power of the base: … b³, b², b¹, b⁰ left of the point, and b⁻¹, b⁻², … to the right.

The decimal number 345 means 3×10² + 4×10¹ + 5×10⁰. The binary number 1011 means 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 11 in decimal. Same idea, different base.

  • Base 2 — binary; bits and machine words
  • Base 8 — octal; historical and some Unix permissions contexts
  • Base 10 — decimal; everyday counting
  • Base 16 — hexadecimal; memory addresses, color channels, byte dumps
  • Bases 11–36 — use letters A–Z as digits after 9 (A = 10, …, Z = 35)

Convert live with the number base converter. For binary arithmetic rather than pure conversion, see the binary calculator guide.

How Do Binary, Octal, Decimal, and Hex Relate?

These four appear constantly in computer science courses and developer tools.

  • Binary ↔ decimal — expand powers of two, or divide by two for the reverse
  • Hex ↔ binary — each hex digit is exactly four bits (nibble); group bits in fours
  • Octal ↔ binary — each octal digit is three bits
  • Hex ↔ decimal — expand powers of 16, or divide by 16 repeatedly

Example: hex 2F = 2×16 + 15 = 47 decimal. Binary of 2F is 0010 1111. Octal is convenient when bits group by threes; hex when they group by fours — which matches modern byte-oriented systems better.

Permissions like 755 in Unix are often taught as octal digit triples (rwx for user, group, other). Memory addresses in debuggers show up in hex because humans can read two hex digits per byte faster than eight bits. Knowing which base a UI assumes prevents “why is this number huge?” confusion when you paste binary into a decimal field.

Color codes like #FF8800 are hex channel values, not a separate number system — still base 16 under the hood. See the hex color converter guide when your goal is RGB/CSS rather than pure radix math.

What Are Bases From 2 to 36 Used For?

Any integer base from 2 to 36 can be written with digits 0–9 and A–Z. Beyond 36 you would need more symbols; most teaching tools stop at 36.

  • Base 12 (duodecimal) — sometimes used in theoretical or puzzle contexts
  • Base 20 (vigesimal) — appears in some cultural number systems and exercises
  • Base 36 — compact IDs using 0–9 and A–Z (case-insensitive schemes)
  • Custom course bases — homework often picks base 5 or 7 to force place-value thinking

When a digit is invalid for the source base (for example digit 8 in base 8, or letter G in base 16), conversion must reject the input. Always state the source base; the string 101 is five in binary, one hundred one in decimal, and two hundred fifty-seven in hex.

Case folding usually treats a and A as the same digit value in hex and higher bases, but your grading rubric or API might require a specific case in the output. Match the consumer: many style guides prefer uppercase hex in dumps and lowercase in web colors — those are conventions layered on top of the same radix math.

Short codes in base 36 are identifiers, not encryption. For text-safe binary packing, use Base64 instead of inventing ad hoc radix tricks.

What Is the Step-by-Step Method to Convert Bases?

Two directions cover most integer work.

Any base → decimal

  1. Write each digit’s value (A = 10, B = 11, …).
  2. Multiply by the place power of the source base (rightmost place is b⁰).
  3. Add the products. The sum is the decimal value.

Decimal → any base

  1. Divide the decimal integer by the target base.
  2. Record the remainder as the next least significant digit.
  3. Replace the number with the quotient and repeat until the quotient is 0.
  4. Read remainders from last to first as the digits in the target base.

To go from base A to base B without thinking in decimal, convert A → decimal → B (or use bit grouping when A and B are powers of two). Showing steps builds trust for exams; automated tools should match those remainders.

Worked sketch: decimal 13 to binary. 13÷2 = 6 r1, 6÷2 = 3 r0, 3÷2 = 1 r1, 1÷2 = 0 r1. Remainders last-to-first: 1101₂. Checking: 8+4+0+1 = 13. That check step catches reversed remainder lists before you submit.

The number base converter can surface step-by-step methodology so you can check homework, not only the final string.

How Do Fractional Values Convert Between Bases?

Left of the point uses the remainder method. Right of the point uses repeated multiplication by the target base: the integer part of each product becomes the next fractional digit; the fractional part is multiplied again.

  • Terminating in one base — may repeat in another (0.1 decimal is repeating in binary)
  • Precision limits — tools truncate or round fractional digits after a fixed length
  • Exactness — integers convert exactly; fractions may be approximate in finite digits

When a problem asks for exact fractions, keep a rational form or more digits than the answer key requires, then round as instructed. Floating displays in calculators are not infinite precision.

Percent-style displays (for example “what percent is this of that?”) are separate from radix conversion — use a percentage calculator guide for part-whole questions.

What Mistakes Happen During Base Conversion?

Most errors are digit validity, place order, or silent base assumptions.

  • Invalid digits — using 2 in binary, or G in hex
  • Remainder order — writing remainders top-to-bottom instead of last-to-first
  • Prefix confusion0x, 0b, and leading zeros are notation, not extra place values
  • Case — A–F vs a–f are the same values in hex; stay consistent in answers
  • Roman numerals — a different encoding, not a positional base; use a Roman numeral converter when letters mean I, V, X, not hex digits

Label every answer with its base (e.g., 1011₂ or 0b1011) in mixed work so readers do not assume decimal.

Leading zeros do not change integer value (00101₂ is still 5) but they matter when a field is fixed width — network masks, register dumps, and homework that asks for n-bit representation. Know whether the question wants a pure value or a padded bit string.

How Do You Use an Online Number Base Converter?

A clear tool path keeps CS homework and debugging consistent.

  1. Open the free number base converter.
  2. Enter the number using valid digits for its source base.
  3. Set the source base (2–36) and the target base (2–36).
  4. Use presets when you only need binary, octal, decimal, or hex.
  5. Convert and read the result; expand steps if you are learning the method.
  6. For fractions, note the precision of the fractional part the tool shows.
  7. Copy the result into homework, code comments, or docs with an explicit base label.

Prefer client-side conversion for quick checks. In production code, use language builtins (parseInt, toString(radix), big-integer libraries) with tests for edge cases. Watch for overflow when values exceed native integer width — big integers need explicit types in many languages.

Related Generatr tools include binary calculators for arithmetic on bits and Roman converters when the symbols are classical numerals rather than radices. Use the right tool: radix conversion rewrites place value; Roman numerals encode with different rules entirely.

Step-by-Step Instructions

  1. 1Open the free number base converter on Generatr.
  2. 2Enter the value using only digits valid for the source base (0–9, A–Z as needed).
  3. 3Select the source base from 2 to 36 (or a common preset).
  4. 4Select the target base from 2 to 36.
  5. 5Convert and read the output string in the target radix.
  6. 6Review step-by-step details when you need to verify place values or remainders.
  7. 7For fractional inputs, check how many fractional digits the tool displays.
  8. 8Label results with their base so binary, hex, and decimal are never mixed up.

Frequently Asked Questions

How do I convert a number from one base to another?+

Convert to decimal by expanding place values, then convert decimal to the target base with repeated division and remainders — or use a base converter for any radix from 2 to 36.

What digits are used in bases above 10?+

After 9, letters represent higher digits: A = 10, B = 11, through Z = 35 in base 36. Digits must always be less than the base.

Why is hexadecimal common in programming?+

One hex digit maps to four bits, so two hex digits cleanly represent a byte. That makes memory dumps, colors, and bit patterns shorter than long binary strings.

Can I convert fractional numbers between bases?+

Yes. The integer part uses division/remainders; the fractional part uses repeated multiplication by the target base. Finite displays may round repeating expansions.

What is the difference between base conversion and binary arithmetic?+

Base conversion rewrites the same value in another radix. Binary arithmetic adds, subtracts, multiplies, or divides bit patterns. You often convert to check arithmetic results in decimal.

Is Generatr’s number base converter free?+

Yes. It runs in the browser with bases 2–36, step-by-step conversion, and fractional support without requiring an account.

Ready to try it yourself?

Use the free Number Base Converter — no download, no account.

Launch Number Base Converter