Convert numbers between binary, octal, decimal, and hexadecimal.
Exact integer conversion, including negative and very large numbers. Optional 0b, 0o, or 0x prefix must match the selected base.
Runs in your browser. Your input is processed on this device.
This number base converter instantly translates a whole number between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Choose the base of your input, type the value, and see all four representations at once — handy for working with bitmasks, memory addresses, color values, and low-level debugging.
It validates your input against the selected base, so you always know the number is well-formed before you rely on the conversion.
Binary uses two digits (0–1), octal uses eight (0–7), decimal uses ten (0–9), and hexadecimal uses sixteen (0–9 then A–F). Each is just a different way to write the same underlying value.
They are conventional prefixes that mark a number’s base in code: 0b for binary, 0o for octal, and 0x for hexadecimal. The tool shows them for clarity and accepts input with or without them.
This converter works with non-negative whole numbers. Fractional values and two’s-complement negative representations are outside its scope.