Number Base Converter

Convert numbers between Binary, Octal, Decimal, and Hexadecimal. Visualize bits and perform bitwise operations.

Base Conversion

ASCII characterN/A

Bit Visualization

Width:
1
1
1
1
1
1
1
1
0

8

Set bits

0

Clear bits

1

MSB

1

LSB

Bitwise Operations

A (decimal):255
B:

Result of 255 AND 10

Decimal

10

Hex

A

Binary

1010

Octal

12

Free number base converter: binary, hex, octal, and decimal in one tool

Number base conversion is a fundamental skill in computer science and low-level programming. Binary is the native language of digital hardware; hexadecimal is used everywhere from memory addresses to colour codes; octal appears in Unix file permissions; and decimal is what humans naturally think in. Switching between these representations by hand: especially for large numbers: is tedious and error-prone.

This tool converts between all four bases simultaneously and in real time. Enter a number in any base and every other representation updates instantly. Under the hood, JavaScript's BigInt ensures that arbitrarily large integers are handled without floating-point rounding errors. All processing is client-side, so there is no network latency and no privacy risk regardless of what numbers you enter.

Step-by-step guide

  1. 1
    Select the input base
    Choose whether your source number is in binary (base 2), octal (base 8), decimal (base 10), or hexadecimal (base 16).
  2. 2
    Enter your number
    Type or paste the number into the input field. The tool validates characters in real time to ensure they are valid for the selected base.
  3. 3
    View all conversions instantly
    All four representations update live as you type. No button press required: results appear in milliseconds.
  4. 4
    Copy any representation
    Click the copy icon next to any output field to put that representation on your clipboard, ready to paste into code or documentation.
  5. 5
    Try signed or grouped formats
    Toggle options to view the number in two's complement signed form or with spacing groups (e.g. nibble grouping for binary).

Related Tools

Frequently Asked Questions

What number bases does this tool support?
The tool supports the four bases used most commonly in computing: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). These cover the vast majority of use cases in low-level programming, networking, and digital electronics.
How do I convert binary to decimal?
Select Binary as the input base, type your binary number (e.g. 11010110), and the decimal value appears immediately in the Decimal output field. The same process works in reverse: select Decimal, enter your number, and the binary output updates live.
How do I convert hex to binary?
Select Hexadecimal as the input base, enter your hex value (digits 0–9 and letters A–F), and the binary output updates instantly. Each hex digit always maps to exactly four binary bits, so 0xFF becomes 11111111.
What is the largest number the converter can handle?
The tool uses JavaScript's BigInt for all arithmetic, so there is no practical upper limit. Numbers with hundreds of digits are handled without rounding errors that would occur with standard floating-point arithmetic.
What is hexadecimal used for in programming?
Hexadecimal is used whenever compact representation of binary data is important: memory addresses, colour codes (e.g. #FF5733), file magic bytes, network MAC addresses, error codes, and CPU instruction encoding. It is preferred over binary because one hex digit represents exactly four bits, making it four times more compact.
What is octal used for?
Octal is primarily used in Unix/Linux file permission notation. The permission string rwxr-xr-x corresponds to the octal value 755. It also appears in some legacy systems, C character escape sequences, and network protocol specifications.
What is two's complement and when is it relevant?
Two's complement is the standard way modern CPUs represent negative integers in binary. For an n-bit integer, the most significant bit has a weight of -2^(n-1) instead of +2^(n-1). The tool's signed mode shows you the two's complement interpretation for a chosen bit width.
Does the tool handle floating-point numbers?
The current version handles integers only. Floating-point base conversion (e.g. converting 3.14 to binary) involves a different algorithm and is not yet supported. For integers of any size, the tool is fully accurate.
Is my input sent anywhere?
No. All conversion logic runs in your browser. Nothing is transmitted to a server, so the tool is safe to use with sensitive addresses, cryptographic keys, or proprietary protocol values.

AlteredIdea vs alternatives

vs server-side tools: Everything runs in your browser: your data never leaves your device.

vs VS Code extensions: No install needed. Works instantly in any browser.

vs paid tools: Completely free, no account required.