Math

Number Base Converter

Convert signed integers between bases 2 through 36 without losing large integer precision.

Exact method explained belowEditable inputs
Calculation notebook
Calculation notebook

The formula and worked example below explain the calculation.

See the method

Enter your values

Runs on your device

Your answer

Your result

Let’s calculate.

Use the Calculate button to see your result.

Review the method below for assumptions and conventions.

How to use this tool

  1. Enter integer digits, source base, target base.
  2. Select Calculate to view the result.
  3. Check the method and assumptions below before using the result.

Input reference and sample values

Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.

InputFormat and unitsSample
Integer digitsEnter text using the format shown in the sample.FF
Source baseNumeric value. Minimum: 2. Maximum: 36.16
Target baseNumeric value. Minimum: 2. Maximum: 36.10

Result for these sample inputs

255
Source base
16
Target base
10
Decimal integer
255

Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.

The method, explained

Read each digit in the source base using integer multiply-and-add, then express the resulting integer in the target base. Digits above 9 use A through Z.

A WORKED EXAMPLE

FF in base 16 converts to 255 in base 10 and 11111111 in base 2.

What to keep in mind

Up to 256 input digits. Whole numbers only; omit prefixes such as 0x and 0b, commas and spaces. Signed values use a leading minus, not a two’s-complement bit pattern.

Common questions

Can I convert an integer larger than JavaScript’s safe-number limit?

Yes. BigInt arithmetic preserves integer precision rather than using floating-point numbers.

Why is my digit rejected?

Each digit must be smaller than the source base. For example, 2 is not a binary digit.

Methodology maintained by ClarityKit. How these tools are built and checked.