Binary · Octal · Decimal · Hex

Number Base Converter — Binary, Octal, Decimal & Hex

One number in, all four bases out — binary, octal, decimal and hexadecimal — with strict digit validation and bit-length analysis.

Valid digits in decimal: 0–9

Binary (base 2)

1011 0101

Octal (base 8)

265

Decimal (base 10)

181

Hexadecimal (base 16)

B5

Size analysis

Bit length

8 bits

Bytes needed

1 byte

Fits in

uint8

Binary is the truth

Every other base is shorthand for binary. Octal groups bits in threes, hex in fours — the value never changes, only the notation.

Read hex in nibbles

Each hex digit is exactly one nibble (4 bits): B5 = 1011 0101. Colours, memory addresses and UUIDs all reward this reading skill.

Leading zeros are free

005 and 5 are the same number in any base. Leading zeros only matter when a protocol demands fixed width — like 8-digit hex colours.

How to use the base converter

  1. Type your number

    Paste or type the value — the 0x prefix is stripped automatically for hex.

  2. Tell it the source base

    Pick binary, octal, decimal or hexadecimal. Switching base loads a valid example.

  3. Read all four bases

    Every representation appears at once — binary is grouped in nibbles for easy reading.

  4. Check the size analysis

    Bit length, byte count and the smallest fitting unsigned integer type.

Whole numbers only, exact up to 2⁵³−1 — fractions and larger values are rejected rather than misconverted.

Frequently asked questions

Related tools

Need a custom tool?

We build calculators and internal tools for businesses — get in touch.

Directory last updated 2 December 2026.

Disclaimer: conversions are exact only up to 2⁵³−1. Values beyond that are rejected — never silently rounded.