Number Base Converter

Convert an integer from any base between 2 and 36 to another base, including binary, octal, decimal, and hexadecimal.

Use digits without 0x, 0b, separators, or a decimal point; at most 4,096 digits.

Text is processed locally in your browser and is not uploaded.

Source base
16
Target base
10
Output digits
3

How to use this tool

  1. Enter the integer without a base prefix or grouping separators. A leading plus or minus sign is allowed.
  2. Set Source base and Target base to whole numbers from 2 to 36.
  3. Select Convert integer. Read the result in the target base; letters A–Z represent digit values 10–35.

Understanding the output

The output represents the same integer in a different positional number system. It uses uppercase letters, removes unnecessary leading zeroes, and retains a minus sign for negative values. Negative zero is shown as zero. No fixed bit width or two’s-complement interpretation is applied.

Hexadecimal FF in decimal

With integer FF, source base 16, and target base 10, the result is 255: 15 × 16 + 15 = 255. Changing the target to base 2 gives 11111111.

Choose the source base before interpreting digits

The text 10 does not identify one quantity by itself. It means two in binary, eight in octal, ten in decimal, and sixteen in hexadecimal. A source base supplies that missing context. When reading a device register, log, or protocol document, use its stated radix rather than inferring the base from the absence of letters.

Each position contributes a digit multiplied by a power of the base. The rightmost position uses power zero. Letters extend the digit alphabet after nine; F means fifteen, so F is accepted in base 16 but rejected in base 10.

Integer conversion is different from byte interpretation

A hexadecimal integer such as 4142 is a single numeric quantity. Interpreting the bytes 41 and 42 as UTF-8 instead produces the text AB. These are different tasks even though they share hexadecimal notation. This converter does not choose a byte order, decode text, or reinterpret the sign bit of a processor register.

Method and supported input

The input is accumulated using integer multiply-and-add operations with BigInt. Output serialization uses the requested radix. The value never passes through floating-point arithmetic, so integers beyond JavaScript’s ordinary safe-integer range remain exact.

  • The input represents a mathematical integer, not a fractional value or a byte buffer.

Limitations

  • At most 4,096 input digits are accepted. Bases must be integers from 2 through 36.
  • Prefixes, separators, decimal fractions, scientific notation, and fixed-width signed encodings are not supported.

Common questions

Why is 0xFF rejected?

The source base is chosen separately. Enter FF and choose base 16; prefixes are deliberately excluded to avoid conflicting interpretations.

Can I convert a negative binary number?

Yes. Enter a leading minus sign, such as -101, with source base 2. The decimal result is -5, not an unsigned bit-pattern interpretation.

Will a long account ID stay exact?

Integer digits are converted exactly, but leading zeroes are removed. If those zeroes are part of an identifier rather than its numeric value, retain the original string.

Sources and further reading