Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal bases.
What Is Number Base Conversion?
Number base conversion (also called radix conversion) is the process of representing a number in a different numeral system. The most common bases in programming are decimal (base 10, the everyday number system), binary (base 2, used by computers), octal (base 8, used in Unix file permissions), and hexadecimal (base 16, used for colors, memory addresses, and byte representations).
Understanding number bases is fundamental to computer science and programming. Computers operate in binary — every piece of data is ultimately a sequence of 0s and 1s. Hexadecimal provides a compact way to represent binary data (each hex digit maps to exactly 4 binary bits), which is why you see hex values in CSS colors (#FF5733), memory addresses (0x7FFF), and byte-level debugging.
Our number base converter instantly converts between binary, octal, decimal, and hexadecimal with support for arbitrarily large numbers using BigInt. Type in any base, see all four conversions instantly, and copy any result with one click. Binary output is automatically grouped in 4-bit nibbles for readability. All conversions happen entirely in your browser.
How to Convert Numbers Between Bases
- Select the input base — Choose Binary (2), Octal (8), Decimal (10), or Hexadecimal (16) as your starting base.
- Enter your number — Type the number in the selected base. The tool validates your input in real-time (e.g., only 0-1 for binary, 0-9A-F for hex).
- View all conversions — Instantly see the number represented in all four bases: binary (0b prefix), octal (0o prefix), decimal, and hexadecimal (0x prefix).
- Switch input base — Click a different base button and the input value automatically converts, so you can continue editing in any base.
- Copy any result — Click the copy icon next to any conversion to copy it to your clipboard, including the base prefix.
Key Features
- Four base support — Convert between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) simultaneously.
- Real-time conversion — Results update instantly as you type, with no button clicks needed.
- BigInt support — Handles arbitrarily large numbers that exceed standard JavaScript number limits, perfect for cryptography and large address spaces.
- Input validation — Validates your input against the selected base in real-time, showing clear error messages for invalid digits.
- Binary grouping — Binary output is automatically formatted in 4-bit groups (nibbles) for easier reading and bit-level analysis.
- 100% client-side — All conversions happen in your browser. No server calls, no data collection.
Common Use Cases
- CSS color conversion — Convert hex color codes (FF5733) to decimal RGB values or binary representations for low-level graphics work.
- Unix file permissions — Convert between octal permission values (755, 644) and their binary representations to understand read/write/execute bits.
- Debugging memory addresses — Convert hexadecimal memory addresses to decimal or binary for debugging pointer arithmetic and buffer offsets.
- Networking and subnets — Convert IP addresses and subnet masks between decimal dotted notation and binary to understand network partitioning.
- Learning computer science — Visualize how numbers are represented in different bases to build intuition for bitwise operations, encoding, and data storage.
Frequently Asked Questions
🔒 This tool runs entirely in your browser. No data is sent to any server.