Number Base Converter

Convert numbers between Binary, Octal, Decimal, and Hex with visual binary representation.

Number Base Converter

Convert between binary, octal, decimal, and hexadecimal with BigInt support

Quick Examples

Display Options

Per-base grouping

Negative integers use two's complement at this width

Tips: Inputs accept underscores (1_000_000) and optional prefixes (0b, 0o, 0x). Fractions work in every base (0.1, 0x1.8, 0b0.11). Conversion uses BigInt for virtually unlimited size.

Binary, Octal, Decimal, and Hex Converter

A number base converter translates numbers between positional numeral systems: Binary (base 2), Octal (base 8), Decimal (base 10), and Hexadecimal (base 16). Understanding these conversions is a core skill in computer science, low-level programming, and digital electronics.

Type a value into any field and all other bases update in real time. Supports large numbers via BigInt and visually groups binary output into 4-bit and 8-bit blocks.

When to use each number base

  • Binary (base 2): The native language of computers. Used in bitwise operations, CPU registers, flags, and network subnet masks.
  • Octal (base 8): Used in Unix file permission modes (e.g., chmod 755 = 111 101 101 in binary) and some legacy systems.
  • Decimal (base 10): Standard everyday number system. Used in most arithmetic, UI values, and high-level programming.
  • Hexadecimal (base 16): Compact representation of binary data. Used in CSS colors (#FF5733), memory addresses, hash digests, and bytecode.

How to convert decimal to binary

  1. Type any decimal number into the Decimal field.
  2. The Binary, Octal, and Hex fields update instantly.
  3. Enable visual binary grouping to see the result as 4-bit nibbles or 8-bit bytes.
  4. Use the quick examples to explore common values: 255, 1023, 65535.

Common conversions reference

  • 255 decimal = 1111 1111 binary = FF hex = 377 octal
  • 16 decimal = 0001 0000 binary = 10 hex = 20 octal
  • 256 decimal = 1 0000 0000 binary = 100 hex = 400 octal
  • 1023 decimal = 11 1111 1111 binary = 3FF hex = 1777 octal

Frequently Asked Questions

How do I convert between binary, decimal and hexadecimal?

Enter a value in any base and the converter shows it simultaneously in binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). For example, decimal 255 is 11111111 in binary and FF in hex. Conversion is instant and runs in your browser.

What is hexadecimal used for in programming?

Hexadecimal is a compact way to write binary: each hex digit maps to exactly four bits, so a byte is two hex digits. Developers use it for colors (#FF5733), memory addresses, byte values, bitmasks and Unicode code points, because it is far more readable than long binary strings.

Why does 0.1 in decimal not convert cleanly to binary?

Because 0.1 has no exact finite representation in base 2, just as 1/3 has no exact finite representation in base 10. Type 0.1 into the decimal field and the converter shows the binary expansion 0.0001100110011..., cut at 32 digits because it never ends. This is the root of floating-point rounding errors in most programming languages, where 0.1 + 0.2 does not exactly equal 0.3.

Free forever, no ads, no tracking. Support the project