Skip to content
UniKit

Base 2-36 converter

Convert between binary, octal, decimal, hexadecimal and any base from 2 to 36: negative numbers, fractions with configurable precision, 0x/0b/0o prefixes, space or underscore grouping, optional leading zeros and a BigInt-exact result table.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Number to convert

Signs, decimal points and 0x / 0b / 0o prefixes are supported; spaces and underscores are ignored.

Result

Both integer and fraction parts are converted with BigInt, ready to copy or download.

Enter a number to see the result

What this tool does

  • Check binary, octal, hexadecimal and decimal values while debugging front-end, firmware or protocol data
  • Convert integers that exceed the precision of JavaScript Number (for example a 30-digit decimal to hex)
  • See one value in base 2, 8, 10 and 16 at the same time

Example

Input

0b1111 1111

Output

FF

The 0b prefix is auto-detected as base 2 and the target base defaults to 16; the same value is 255 in decimal.

Frequently asked questions

Are fractions converted exactly?

The integer part is exact because everything runs on BigInt. A fraction is finite only when the target base divides the source base; otherwise it is rounded or truncated at the configured precision (16 digits by default), so 0.1 becomes 0.000110011001101 in binary.

How large can the numbers be?

There is no digit limit on the integer part: every digit you type is converted exactly rather than through floating point. Fraction precision is capped at 100 digits.

Which bases are supported?

Any base from 2 to 36. Digits above 9 use a-z and the output case can be switched.

What does "keep leading zeros" do?

It restores as many leading zeros as the source integer part had, so binary 0011 becomes 003 in hex instead of 3.

How are prefixes detected?

When the source base is left on auto, 0x / 0b / 0o select base 16 / 2 / 8 and anything else falls back to base 10. When a source base is set explicitly, only a matching prefix is stripped, so 0b1 in base 16 is read as the digit 0xB1 = 177.

Keywords:base converterradix converterbigint

Related tools