# Number base converter

Canonical HTML: https://easycalculatorsonline.com/conversions/number-base/

Convert signed integers between bases2 through36.

Interactive calculations run in your browser. Values below are the published example, not a calculation for your circumstances.

## Calculator inputs

| Input | Example value | Constraints and options |
| --- | --- | --- |
| Integer digits | 255 |  |
| Source base | 10 | min: 2. max: 36. step: 1 |
| Destination base | 2 | min: 2. max: 36. step: 1 |

**International formulas and units**

Use the units and assumptions stated on this page. Mathematical definitions apply across countries; material, device and measurement conditions remain your inputs.

## Published example result

> Number base converter
> Converted integer: 11111111
> Source base: 10
> Destination base: 2
> Exact BigInt conversion. A–Z denote10–35. Fractions and prefixes are not supported.
> https://easycalculatorsonline.com/conversions/number-base/

03 · UNDERSTAND THE METHOD

## How the number base converter works

A positional number system uses a base to determine the value of each digit position. Decimal uses ten, binary uses two, and hexadecimal uses sixteen. This converter accepts integer digits in any selected base from two through 36 and writes the same integer in another base. It uses exact integer arithmetic rather than rounding a large value into a floating-point number. A leading minus sign preserves a negative integer’s sign.

### The formula and its variables

Integer value = d₀b^k + d₁b^(k−1) + … + d\_k; each digit value must be below base b

- **Integer digits**: Up to 256 digits, optionally preceded by a minus sign.
- **Source base**: Integer radix from 2 through 36.
- **Destination base**: Radix used to write the converted integer.

### The calculation, step by step

1. Enter integer digits without prefixes or separators and choose the source base. Letters A through Z represent digit values ten through 35, with either letter case accepted.
2. Check that every digit is valid in the selected source base. Accumulate the magnitude using exact integer multiplication by the base and addition of each digit.
3. Apply the sign and repeatedly divide by the target base to obtain its digits. Read the uppercase output as a representation of the same integer.

### A worked example

Decimal 255 converts to binary 11111111 and hexadecimal FF. In hexadecimal, each F means fifteen, so FF represents 15 × 16 + 15 = 255. Decimal −255 becomes −FF in hexadecimal, preserving the sign. A digit 2 is invalid in base two and is rejected instead of being silently interpreted as a decimal value.

**Example inputs and calculated output**

| Input or output | Value |
| --- | --- |
| Integer digits | 255 |
| Source base | 10 |
| Destination base | 2 |
| Converted integer | 11111111 |

### How to read the result and visual

Changing a base changes written representation, not the integer’s value. Leading zero digits do not change that value. A negative output uses an ordinary minus sign; it does not describe a fixed-width computer storage pattern. Exact arithmetic makes this tool suitable for long integer conversions within the digit limit.

### Assumptions, rounding, and limitations

Fractions, decimal points, radix prefixes such as 0x, grouping commas, and plus signs are not supported. The tool does not encode two’s-complement bit patterns or choose a byte width. Very long valid outputs can require horizontal reading space. Binary file contents and character encodings are different problems from converting a single integer.

### Frequently asked questions

### Are letters case sensitive?

No. Input letters are accepted in either case; the output uses uppercase.

### Why is 0xFF rejected?

The input expects digits only. Select source base 16 and enter FF without a prefix.

### Reference sources

- [ECMAScript: exact BigInt integer arithmetic ↗](https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-ecmascript-language-types-bigint-type)

[How we check calculations and what verification covers](https://easycalculatorsonline.com/methodology/)

## Related calculators

[**GCD & LCM ↗**

Find the greatest common divisor and least common multiple.](https://easycalculatorsonline.com/math/gcd-lcm/)[**Rounding calculator ↗**

Round a number to a chosen number of decimal places.](https://easycalculatorsonline.com/math/rounding/)[**Percentage ↗**

Make percentages feel a little less complicated.](https://easycalculatorsonline.com/math/percentage/)

[← Explore all calculators](https://easycalculatorsonline.com/#browse)

## Publisher and access

Published by Wolfpack Labs. Free to use; no account or payment required.

[Email wolfpack.labs.in@gmail.com](mailto:wolfpack.labs.in@gmail.com)

[About](https://easycalculatorsonline.com/about/) · [Methodology](https://easycalculatorsonline.com/methodology/) · [Contact](https://easycalculatorsonline.com/contact/) · [Privacy](https://easycalculatorsonline.com/privacy/) · [Terms](https://easycalculatorsonline.com/terms/)
