Skip to main content
Toolsbase Logo

Number Base Converter

Convert between binary, octal, decimal, and hexadecimal. Instantly convert number systems with auto-detection and live results.

Last updated:

How to Use

Expand how to use
  1. 1

    Enter a number

    Enter a number in the input field. Use prefixes like 0b (binary), 0o (octal), or 0x (hexadecimal). No prefix assumes decimal.

  2. 2

    Check results

    The conversion results are displayed in real-time for binary, octal, decimal, and hexadecimal.

  3. 3

    Copy

    Use the copy buttons to copy individual results or all results at once.

Input

Options

Conversion Results

Enter a number to see conversion results

About Number Base Converter

Number Base Converter instantly converts between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16), showing all four results simultaneously as you type. Enter any value and the tool auto-detects the base from standard prefixes — 0b for binary, 0o for octal, 0x for hex — so there is no need to select it manually. This is indispensable for low-level programming tasks: decoding memory addresses and register values in C, C++, or Rust; calculating subnet masks in binary for network engineering; converting chmod permission octals (0755) to binary to understand which bits are set; and reading hex color codes as decimal RGB components. Output options include uppercase or lowercase hex digits, optional prefix display, and digit grouping (binary in groups of 4, others in groups of 3) for improved readability.

Key Features

  • 4 base conversions (binary, octal, decimal, hexadecimal)
  • Auto-detection (0b, 0o, 0x prefixes)
  • Real-time conversion (instant results as you type)
  • Output format options (uppercase/lowercase, prefix display, digit grouping)
  • Copy all results at once

Common Use Cases

  • Convert hex color codes like #FF5733 to RGB decimal values
  • Calculate subnet masks and network addresses in binary
  • Debug bitmask flags or register values in C, C++, or Rust
  • Convert chmod permission octal values (e.g., 0755) to binary
  • Inspect memory addresses or pointer values in hex and decimal

Frequently Asked Questions

What is the range of values that can be converted?

The tool supports unsigned 32-bit integers from 0 to 4,294,967,295 (0xFFFFFFFF in hex, 0b11111111111111111111111111111111 in binary). Negative numbers and fractional values are not supported. For values outside this range, consider a command-line tool or a programming language's built-in conversion functions.

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

These are the standard numeric literal prefixes used in most programming languages (C, Python, JavaScript, Go, Rust, etc.). 0b denotes binary (base 2), 0o denotes octal (base 8), and 0x denotes hexadecimal (base 16). A number without a prefix is interpreted as decimal (base 10). The tool detects these prefixes automatically.

What is digit grouping and when should I use it?

Digit grouping inserts separators between groups of digits to improve readability. Binary values are grouped in sets of 4 bits (e.g., 1111 0000), matching nibble boundaries commonly used when reading hex. Decimal and hex values are grouped in sets of 3 or 4 respectively. Enable it when working with long values where it is easy to lose track of bit positions.

Should I use uppercase or lowercase for hexadecimal?

Both are valid and equivalent. Lowercase (ff, 0xff) is conventional in CSS color values and most Unix/Linux tools. Uppercase (FF, 0xFF) is common in hardware documentation, assembly language, and some debuggers. Use whichever matches your project's style guide — this tool outputs either on demand.

Why do I need to convert between number bases?

Different number bases are used in different contexts. Binary maps directly to how computers store data in bits. Octal is a compact representation of binary in groups of 3 bits, historically used for Unix file permissions. Hexadecimal represents 4 bits per digit, making it ideal for reading memory addresses, RGB colors, and byte-level data. Converting between them is a daily task for systems programmers, embedded engineers, and network administrators.

Is my input data sent to a server?

No. Conversion uses JavaScript's parseInt/toString with explicit radix arguments, running entirely in your browser. No network requests are made.