Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal — with live two-way editing.

0b
0o
0x
Decimal value: 10
As char:

Number Bases

Edit any field and the others update live. Binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16) are just different ways to write the same integer. Common in bit manipulation, color codes, permissions and low-level debugging.

Frequently asked questions

Which bases can I convert between?

Binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). Editing any field updates the others live, so you can convert in any direction.

Is there a limit on the number size?

Conversions are exact up to JavaScript's safe integer limit (2^53 − 1). Beyond that, precision cannot be guaranteed, so the tool guards against silently wrong results.

How do I read the 0x, 0b and 0o prefixes?

They mark the base of a literal: 0x is hexadecimal, 0o is octal and 0b is binary — the same notation many programming languages use.