Number Base Converter

Convert whole numbers between binary, octal, decimal and hexadecimal in real time.

Advertisement

What this tool does

This converter translates a whole number between the four number systems programmers use most. Type into any field and the others update automatically. It is handy for working with colors, permissions, bitmasks, memory addresses and network values.

The number systems

  • Binary (base 2) — only 0 and 1; how computers store data.
  • Octal (base 8) — digits 0–7; used in Unix file permissions.
  • Decimal (base 10) — everyday numbers.
  • Hexadecimal (base 16) — 0–9 and a–f; compact for bytes and colors.

Example

The decimal number 255 is 11111111 in binary, 377 in octal, and ff in hexadecimal — which is why #ffffff is white in CSS.

Limitations

  • This tool handles non-negative whole numbers. Fractions and negative numbers are not converted.
  • Extremely large values use JavaScript’s big-integer handling where possible, but inputs with invalid digits for the chosen base are rejected.
Privacy: All conversion happens in your browser.
Advertisement