Skip to main content
Calcimator

Number Base Converter

Convert numbers between any base (2-36). Enter a number in one base and convert to another.

About this calculator

This calculator converts a number from one positional base (2 through 36) to another. It treats each digit character you type into Value as a literal digit of a number written in From Base — combined digit by digit with decimalValue = decimalValue * fromBase + digit — then re-expands that decimal total into To Base one remainder at a time. From Base, not Value, is the input with the largest measured effect on Decimal Value: because every digit's contribution is multiplied by From Base as the loop runs, a small change to it compounds across all three digits of the default value (255), while a change to Value only shifts individual digit contributions.

To Base shows zero measured effect at its default of 2, but only because 2 is also the floor the engine clamps it to with Math.max(2, Math.min(36, Math.floor(...))) — nudging it up rounds back down to 2, and nudging it down rounds to 1 and then gets clamped straight back to 2, so both directions land on the same starting value. What the calculator does NOT support: Value is a plain numeric field restricted to the characters 0 through 9, so a source number in a base above 10 that genuinely needs a letter digit like A through F can never actually be typed in, even though From Base itself accepts values up to 36.

Inputs

Results

Converted Value

11111111

Decimal Value255
Digit Count8
How to Use This Calculator
  1. Enter Value, From Base, and To Base.
  2. Review the Converted Value result.
  3. Use Decimal Value and Digit Count to inform your decision.
  4. Use the chart to visualize the results and explore different scenarios by adjusting inputs.

What each input means

Value
The number to convert (enter digits as if in the source base, using 0-9 only)
From Base
Source number base (2=binary, 8=octal, 10=decimal, 16=hex)
To Base
Target number base

Engine last updated . Checked against 5 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Why is From Base the input that moves Decimal Value the most, rather than Value?

Value's digits are combined with From Base using the same formula at every position: decimalValue = decimalValue * fromBase + digit. From Base gets multiplied in three separate times for the default three-digit value, compounding its influence, while a change to Value only shifts one digit's contribution. That compounding is why a small change to From Base swings Decimal Value further than the same-sized change to Value.

Why does changing To Base from 2 to 2.2 or 1.8 leave the result unchanged?

To Base has a hard floor: the engine clamps it with Math.max(2, Math.min(36, Math.floor(...))), and 2 is the lowest value that clamp permits. Rounding 2.2 down lands back on 2, and rounding 1.8 down to 1 gets pushed back up to 2 by the same clamp — both directions return the identical starting value, which is why To Base looks unresponsive right at its own floor.

Can this calculator convert a real hexadecimal number, like 1F?

Not directly. From Base supports values up to 36, which covers hexadecimal in principle, but the Value field only accepts the digit characters 0 through 9 — there's no way to type a letter digit such as A through F into it. Any genuine hex number that needs one of those letter digits simply cannot be entered, regardless of what From Base is set to.

What does 'Invalid — digit exceeds base' mean?

It means a digit you typed into Value is too large for the From Base you chose — for example, typing a 9 with From Base set to 2, since binary only allows the digits 0 and 1. The engine checks each digit against From Base and, instead of throwing an error, returns that text as the Converted Value while Decimal Value and Digit Count both fall back to 0.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.