Tools/Number Base Converter

Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal.

Input base

Runs entirely in your browser — your data never leaves this page.

About the Number Base Converter

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.

How to use it

  1. 1Select the base of the number you are entering.
  2. 2Type the value — invalid digits for that base are flagged immediately.
  3. 3Read the binary, octal, decimal, and hexadecimal equivalents.
  4. 4Copy whichever representation you need.

Common use cases

  • Converting between hex and decimal while debugging
  • Reading binary bitmasks and flags
  • Working with memory addresses and byte values
  • Learning how number bases relate

Frequently asked questions

What is the difference between the bases?

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.

What do the 0b, 0o, and 0x prefixes mean?

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.

Does it handle negative numbers or decimals?

This converter works with non-negative whole numbers. Fractional values and two’s-complement negative representations are outside its scope.