Base converter

Number Base Converter

Convert whole numbers between binary, decimal, hexadecimal, and octal without leaving the browser.

Binary-
Decimal-
Hex-
Octal-
Bits-
StatusWaiting

What number bases mean

A number base controls how many symbols are available in each digit position. Decimal uses ten symbols, binary uses two, octal uses eight, and hexadecimal uses sixteen. The same quantity can be written in each base, which is why programmers often move between decimal, binary, and hex when reading memory, colors, byte values, and protocol examples.

BinaryTrans keeps this converter focused on non-negative whole numbers. That avoids confusing signed integer rules, floating point rounding, and language-specific overflow behavior. For signed binary or two's complement, use the plain result as a starting point and then apply the signed interpretation required by your environment.

Read the same value in four bases

Enter one whole number and choose the base used by the input. The converter shows binary, decimal, hexadecimal, octal, and the number of significant bits. For example, enter 42 as Decimal to see binary 101010, hexadecimal 2A, and octal 52. Enter 101010 as Binary and the same quantity appears in the other formats.

Hexadecimal is convenient for compact technical notation because each digit represents four binary bits. Octal is still useful in some permissions and legacy systems. Decimal is usually easiest to read when comparing quantities. Converting between bases changes the notation, not the underlying number.

Input rules and interpretation

Use digits that are valid for the selected base: 0 and 1 for binary, 0 through 7 for octal, 0 through 9 for decimal, and 0 through 9 plus A through F for hexadecimal. The input accepts spaces and a leading 0x for hex. Negative numbers, fractions, signed two's-complement values, and floating-point encodings need additional rules and are outside this small unsigned whole-number calculator.

If your value represents text, switch to the Binary Code Translator instead. Numeric binary 0 and the ASCII character 0 are different concepts. Use the ASCII Table when you need to map a character to its code.

Related converters