Skip to content
empinet.dev
Converters

Number Base Converter

Convert binary, octal, decimal, and hexadecimal integers directly in your browser. Keep large numbers exact and compare the same value in all four bases.

Convert an integer between bases

Signed integers only. Matching 0b, 0o, and 0x prefixes are optional. Large integers retain exact precision.

Binary to decimal and decimal to hex

Binary uses digits 0 and 1, octal uses 0 through 7, decimal uses 0 through 9, and hexadecimal adds A through F. For example, decimal 255 is binary 11111111, octal 377, and hexadecimal FF. Select the source base before pasting a value; optional 0b, 0o, and 0x prefixes must match that base.

Exact large and negative integers

Conversion uses arbitrary-precision integers instead of floating-point numbers, avoiding precision loss above JavaScript’s safe integer range. Negative values keep a minus sign; they are not encoded as a fixed-width two’s-complement bit pattern. Fractions, digit separators, and scientific notation are not supported. Input is limited to 4,096 characters.