MMaxTools

Number Base Converter

Convert between binary, octal, decimal and hexadecimal in one glance.

The Number Base Converter translates any integer between the four bases that matter in computing: binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). Type a number in any of them — prefixes like 0xFF, 0b1010 and 0o17 are accepted automatically — and see the same value in all four bases at once.

Developers meet these conversions constantly: color codes like #FF5733 are hex bytes, network masks and permissions are octal, bitmasks and registers are binary, and error codes come back in hex from the strangest places. Being fluent means seeing 0xFF as 255 and 0b11111111 instantly, and this tool builds that fluency by showing every representation side by side with one-click copy.

Conversion is exact for integers up to JavaScript's safe range (2⁵³ − 1 ≈ 9.007 × 10¹⁵); larger values trigger a clear warning instead of a silently wrong answer. Everything runs locally in your browser.

Prefixes like 0x, 0b or 0o are accepted and auto-detected.

Binary111111110b11111111
Octal3770o377
Decimal255
HexadecimalFF0xFF

Decimal value: 255 · needs 8 bits in binary. Hex letters are shown uppercase.

How to use the Number Base Converter

  1. Type a number in any base — 255, 0xFF, 0b11111111 or 0o377 all work.
  2. If the number has no prefix, choose its base from the dropdown.
  3. Read the same value in binary, octal, decimal and hexadecimal simultaneously.
  4. Copy any representation with one click.
  5. Note the bit count — how many binary digits the value needs.

Frequently asked questions

How do I convert hexadecimal to decimal?

Multiply digit by digit by powers of 16: 0xFF = 15×16 + 15 = 255. This converter does it instantly and shows all four bases, so you can verify the result: 0xFF = 255 = 0b11111111 = 0o377.

What are bases 2, 8, 10 and 16?

Binary (base 2) uses digits 0–1, the language of transistors. Octal (base 8) uses 0–7, historically used for Unix permissions. Decimal (base 10) is everyday arithmetic. Hexadecimal (base 16) uses 0–9 plus A–F, a compact way to write bytes — two hex digits per byte — used in colors, memory addresses and networking.

Why do programmers use hexadecimal so much?

Because one hex digit maps cleanly to four bits and two hex digits to exactly one byte. A 32-bit address like 0x7FFFFFFF is far easier to read and spot-check than its 32-character binary form, and converting between them is trivial.

What happens if my number is too large?

JavaScript numbers are exact only up to 2⁵³ − 1 (about 9.007 × 10¹⁵). Beyond that, binary/octal/hex conversions can lose precision, so the tool shows a warning rather than returning a subtly wrong result.