Number Base Converter

Convert numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Includes bit visualization for binary output.

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

Conversion Results
Enter a number to convert
Quick Examples
Convert between number bases instantly. Supports binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). All conversions happen locally in your browser.

How to Use This Tool

  1. 1

    Select the input base

    Choose the number system of your input: Binary (2), Octal (8), Decimal (10), or Hexadecimal (16).

  2. 2

    Enter your number

    Type a number valid for the selected base. For example, binary only accepts 0 and 1, hex accepts 0-9 and A-F.

  3. 3

    View all conversions

    The tool instantly converts your number to all four bases simultaneously. The bit visualization shows the binary representation visually.

  4. 4

    Copy or try examples

    Click any result to copy it. Use the quick examples buttons to load common values like 255, 1024, or 42.

Frequently Asked Questions

What are number bases?
Number bases (or radixes) define how many unique digits are used. Decimal uses 0-9 (base 10), binary uses 0-1 (base 2), octal uses 0-7 (base 8), and hexadecimal uses 0-9 and A-F (base 16).
Why is hexadecimal used in programming?
Hexadecimal is compact — each hex digit represents exactly 4 binary bits. This makes it ideal for memory addresses, color codes (#FF0000), and byte values (0x00-0xFF).
What are the maximum values supported?
This tool supports very large numbers using BigInt arithmetic. Binary inputs can be up to 64 digits, and decimal inputs up to 20 digits.
How do I read the bit visualization?
Each box represents one bit. Filled/colored boxes are 1s and empty boxes are 0s. Bits are padded to full bytes (groups of 8) for clarity.