Number Base Converter
Convert between Binary (base 2), Octal (base 8), Decimal (base 10), and Hexadecimal (base 16). Edit any field and the rest update instantly.
Understanding Number Bases — Binary, Octal, Decimal, and Hexadecimal Explained
Number bases (also called radixes) are different ways to represent the same numerical value using different sets of digits. Understanding base conversion is fundamental to computer science, networking, and low-level programming.
The Four Most Common Number Bases in Computing
- Binary (Base-2) — Uses digits 0 and 1. The foundation of all digital computing — every piece of data in a computer is ultimately stored as binary. Used in bitwise operations, network subnet masks, and hardware design.
- Octal (Base-8) — Uses digits 0—7. Historically used in early computing. Still used today for Unix file permissions (
chmod 755), where each digit represents 3 binary bits (read/write/execute). - Decimal (Base-10) — Uses digits 0—9. The human-standard number system used in everyday life, mathematics, and most programming variables.
- Hexadecimal (Base-16) — Uses digits 0—9 and A—F. Each hex digit represents exactly 4 binary bits, making it a compact way to represent binary data. Used in CSS colors (
#FF5733), memory addresses, MAC addresses, IPv6 addresses, and byte values.
Quick Reference Table
- 255 decimal =
11111111binary =377octal =FFhex (max value of one byte) - 42 decimal =
101010binary =52octal =2Ahex (the answer to everything) - 256 decimal =
100000000binary =400octal =100hex (one byte + 1) - 65535 decimal =
1111111111111111binary =177777octal =FFFFhex (max 16-bit value)
Where You'll Use Base Conversion
- Reading hexdump output — Debug binary files, network packets, and memory dumps
- CSS and web development — Convert between hex color codes and RGB decimal values
- Network engineering — Calculate subnet masks, convert IPv6 addresses, read MAC addresses
- Unix/Linux administration — Set file permissions using octal notation (
chmod 644) - Bitwise operations — Understand flags, masks, and bit manipulation in binary
- Assembly and embedded programming — Memory addresses and register values in hexadecimal
Frequently Asked Questions
Enter a number in any field (binary, octal, decimal, or hexadecimal) and the tool instantly converts it to all other bases using JavaScript's built-in parseInt() and toString() functions. All conversions happen in your browser — no data is sent to any server.
Binary (base-2) uses digits 0-1 and is the native language of computers. Octal (base-8) uses digits 0-7 and is used in Unix file permissions. Decimal (base-10) uses digits 0-9 and is the standard human number system. Hexadecimal (base-16) uses 0-9 and A-F and is widely used for colors, memory addresses, and byte representation.
Developers convert between bases for tasks like reading memory addresses (hex), setting Unix file permissions (octal), debugging bitwise operations (binary), working with CSS/HTML colors (#FF5733 is hex), analyzing network packets, and understanding low-level data representation in computing.
This tool uses JavaScript's number handling, which safely supports integers up to 2^53 - 1 (9,007,199,254,740,991) via Number.MAX_SAFE_INTEGER. For most development tasks — color codes, file permissions, port numbers, and memory addresses — this range is more than sufficient.
Yes. All number conversions are performed entirely in your browser using client-side JavaScript. No data is transmitted to any server or stored anywhere. You can safely convert sensitive values like memory addresses or internal system identifiers.