Number Base Converter

Convert any number between binary, octal, decimal, and hexadecimal. Type in one base and all the others update instantly.

All conversions happen locally in your browser. Nothing leaves your device.

Convert to
Binary (base 2)
—
Octal (base 8)
—
Decimal (base 10)
—
Hexadecimal (base 16)
—

About Number Bases

A number base (radix) is simply how many digits a system uses before carrying to the next position. Computers live in base 2, memory addresses are commonly written in base 16, and we all count in base 10 — and the value 255 is written 255, 11111111, 377 and FF in those four systems. Understanding how positions encode value makes all of these instantly readable.

BaseAllowed charactersPrefix convention
Binary (2)0–10b — e.g. 0b1010
Octal (8)0–70o — e.g. 0o377
Hexadecimal (16)0–9, a–f0x — e.g. 0xFF

Frequently Asked Questions

What is a number base (radix)?

A base is the number of distinct digits a system uses before carrying to the next position. Base 10 (decimal) uses 0–9, base 2 (binary) uses 0–1, base 8 (octal) uses 0–7 and base 16 (hexadecimal) uses 0–9 plus a–f. The same quantity — say 255 — is written 255, 11111111, 377 and FF in those four bases.

Why is the maximum 2^53 − 1?

This tool stores values as JavaScript numbers, which are IEEE 754 doubles. They represent every integer exactly only up to 2^53 − 1 (9,007,199,254,740,991). Beyond that, the gap between representable numbers grows, so conversions would silently lose precision.

What are the 0b, 0o and 0x prefixes?

They are conventions used in programming languages and calculators to say which base a literal is written in: 0b for binary (0b1010), 0o for octal (0o377) and 0x for hexadecimal (0xFF). Without them, 1010 would always be read as the decimal number one thousand ten.

How does the conversion actually happen?

The digits of your input are evaluated positionally — each digit is multiplied by a power of the base — producing one whole number. That number is then re-expressed digit by digit in each target base, which is why all four cards always show the same value.

Can I enter negative numbers or decimals?

No. This converter handles non-negative integers only — digits with no sign and no decimal point. It validates as you type and flags any character that is not allowed in the selected base.