Skip to content

Number Base Converter

Convert numbers between Binary, Octal, Decimal, Hexadecimal, and custom bases

Input

Filled in with example values. Change them to calculate your own.

Binary0b
0b1111 1111
Octal0o
0o377
Decimalno prefix
255
Hexadecimal0x
0xFF

Bit Representations (Two's Complement)

8-bit
1111 1111
16-bit
0000 0000 1111 1111
32-bit
0000 0000 0000 0000 0000 0000 1111 1111

Special Interpretations

CSS Color
#0000FF
RGB(0, 0, 255)

What is the Number Base Converter?

The Number Base Converter translates numbers between different numeral systems — binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16). These different bases aren't just academic: programmers work with hex and binary constantly when dealing with memory addresses, colour codes, and data at the hardware level. CalciHub's version converts across all four standard bases simultaneously, so you can see the same number expressed in every system at once.

How Does It Work?

Every number system uses a different base to determine the place value of each digit.

To convert any number to decimal:

Decimal value = Σ (digit × base^position)

For example, binary 1011:

= (1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰)

= 8 + 0 + 2 + 1 = 11 in decimal

To convert a decimal to another base, divide repeatedly by the target base and record the remainders, the remainders read in reverse give the converted number.

How to Use CalciHub's Number Base Converter

1. Select which base system your input number is in (binary, octal, decimal, or hexadecimal).

2. Type the number in the input field.

3. The equivalent values in all other bases appear instantly.

Tip: Hexadecimal uses letters A–F for values 10–15. If you're entering a hex number, the calculator accepts both uppercase and lowercase letters – so "1A3f" and "1a3F" are treated the same.

A Quick Example

A web developer is working on a colour stylesheet. The brand colour is specified as the hex code #3A7BD5, and they want to understand the decimal RGB values and the binary representation of each component.

Input: 3A (hex), the red component

Source base: Hexadecimal

Results:

Decimal: 58

Binary: 00111010

Octal: 72

The full hex colour #3A7BD5 breaks into R=58, G=123, B=213 in decimal — which is what CSS rgb() values require.

Frequently Asked Questions

CalciHub's Number Base Converter handles the four most commonly used bases: binary (2), octal (8), decimal (10), and hexadecimal (16). These cover the vast majority of practical computing and math needs.