Number Base Converter
Type in any field to instantly convert between decimal, binary, hex and octal

How to Use This Tool

  1. Type a number into any of the four fields: Decimal, Binary, Hexadecimal, or Octal.
  2. All other fields update simultaneously with the equivalent value in their respective base.
  3. The "Conversion Reference" panel below shows all four representations with their prefixes (0b, 0x, 0o) and the bit length of the binary representation.
  4. Hexadecimal input is case-insensitive — you can type in upper or lower case.

Common Use Cases

  • Understanding how a decimal number is represented in binary (base 2) for low-level programming.
  • Converting memory addresses or color values from hexadecimal to decimal and back.
  • Learning the relationship between binary and hexadecimal (each hex digit maps to exactly 4 bits).
  • Converting UNIX file permissions (octal) to understand them at the bit level.
  • Checking the decimal value of a binary flag register while debugging embedded system code.

Frequently Asked Questions

What is base conversion?

Base conversion is the process of expressing the same number in different positional numeral systems. Decimal uses base 10 (digits 0–9), binary uses base 2 (digits 0–1), hexadecimal uses base 16 (digits 0–9 and A–F), and octal uses base 8 (digits 0–7).

Why is hexadecimal so common in computing?

One hexadecimal digit represents exactly 4 binary bits, and two hex digits represent one byte (8 bits). This makes hex a far more compact and human-readable way to express binary values than writing out every individual 0 or 1.

What is the maximum number this converter handles?

The converter uses JavaScript's native parseInt() and toString() methods with standard 64-bit floating-point arithmetic. It accurately handles integers up to 2^53 − 1 (9,007,199,254,740,991). For larger values, a BigInt-based tool is recommended.

Why does octal start with "0o" in the output?

The "0o" prefix is the modern JavaScript/ES2015 notation for octal literals, distinguishing them from decimal numbers. Some older languages use a leading "0" (e.g. 0377 in C), but that notation is ambiguous and not used here.

Related Tools

JSON Formatter

Format and validate JSON instantly

Use Tool

Base64 Encoder

Encode and decode Base64 strings

Use Tool

URL Encoder

Encode and decode URLs

Use Tool