Number System Converter
Convert numbers between binary, octal, decimal, and hexadecimal instantly with grouped display.
Developer Utility & Security Suite
A connected toolkit for web developers: validate payloads, secure credentials, optimize frontend assets, and budget LLM deployments entirely inside your browser.
Convert dynamic JSON payloads into clean, strongly-typed TypeScript interfaces.
Prettify, minify, and validate JSON syntax errors with line-by-line linting.
Encode and decode strings, API tokens, and binary assets safely client-side.
Generate and verify Blowfish cryptographic password hashes with custom salt rounds.
Create high-entropy passwords using system hardware entropy with zero tracking.
Validate environment variable files for POSIX syntax and scan for accidental token leaks.
Minify vector markup, strip editor namespaces, and round coordinates offline.
Generate balanced 50 to 950 color shade scales and export tailwind.config blocks.
Calculate prompt tokens and project API costs for GPT-4o, Claude 3.5, and Gemini.
How to Use
Enter a number in any base
Type in Binary, Octal, Decimal, or Hexadecimal — all other fields update instantly.
View all four representations
See the number expressed in all four bases simultaneously with grouped formatting for readability.
Check bit grouping for binary values
Read binary output in nibble (4-bit) groups and hex in byte-aligned pairs.
Apply results to programming tasks
Use hex for memory addresses, binary for bit manipulation, and octal for Unix permissions.
Positional Number Systems: Mathematical Foundations of Binary, Octal, Decimal, and Hexadecimal
Numbers are abstract mathematical concepts, but the symbols we use to represent them are cultural and technological conventions. Throughout history, human civilizations developed Base-10 (Decimal) because humans possess ten fingers. However, modern computational hardware relies on Base-2 (Binary), Unix operating systems structure file permissions using Base-8 (Octal), and software memory addressing standardizes on Base-16 (Hexadecimal).
The Number System Converter translates numerical values simultaneously across Binary, Octal, Decimal, and Hexadecimal notations. By modeling positional radix mechanics, it provides instant mathematical conversion for computer science students, software engineers, and digital electronics designers.
Positional Place-Value Mathematics
All modern number systems rely on the positional numeral system. In a positional system with Base (radix) $B$, the position of each digit indicates the power of the base by which that digit is multiplied. For any number consisting of digits $d_{n-1} d_{n-2} dots d_1 d_0$:
Value = (d_{n-1} × B^{n-1}) + (d_{n-2} × B^{n-2}) + ... + (d_1 × B^1) + (d_0 × B^0)
The Four Foundational Computing Bases
| Number System | Radix (Base) | Allowed Digit Symbols | Primary Architectural Application |
|---|---|---|---|
| Binary | Base 2 | 0, 1 | Microprocessor transistors, logic gates, network bitmasks. |
| Octal | Base 8 | 0, 1, 2, 3, 4, 5, 6, 7 | Unix POSIX file permissions (e.g., chmod 755 represents 3-bit triplets: rwxr-xr-x). |
| Decimal | Base 10 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 | Human financial accounting, scientific measurement, standard human cognition. |
| Hexadecimal | Base 16 | 0–9, A, B, C, D, E, F | Memory pointer addresses (0x7FFF5FBFF840), color codes (#FFFFFF), bytecode inspection. |
Direct Grouping: The Binary-Octal-Hex Shortcut
Because Base 8 and Base 16 are exact powers of 2 (content: '
Number Systems Explained
Computers process data in binary (base 2). Octal (base 8) and hexadecimal (base 16) are shorthand notations for binary. Hexadecimal is widely used in programming, HTML colors, memory addresses, and network protocols.
',^3 = 8$ and content: 'Number Systems Explained
Computers process data in binary (base 2). Octal (base 8) and hexadecimal (base 16) are shorthand notations for binary. Hexadecimal is widely used in programming, HTML colors, memory addresses, and network protocols.
',^4 = 16$), you can convert between Binary, Octal, and Hexadecimal without performing long division through Base 10:- Binary to Octal: Group binary bits into sets of 3 bits from right to left:
11010111_2➔011 | 010 | 111➔ $3 cdot 8^2 + 2 cdot 8^1 + 7 cdot 8^0$ = $327_8$. - Binary to Hexadecimal: Group binary bits into sets of 4 bits (nibbles) from right to left:
11010111_2➔1101 | 0111➔D | 7= $D7_{16}$.
Real-World Examples & Use Cases
Bitwise Operations and Flags in Programming
Developers writing low-level code, embedded systems, and network protocols work with bitmasks and bit flags. Checking whether a permission flag is set: if (permissions & 0b00000100) uses binary literals. Setting a flag: config |= 0x08 uses hex. A number system converter helps developers move between the decimal value in business logic and the binary/hex representations in code, verifying that a decimal permission number like 52 corresponds to the intended bit pattern 00110100 with the right flags set.
Unix File Permissions (chmod)
Unix file permissions are commonly specified in octal notation. chmod 755 sets owner=read/write/execute (7=111), group=read/execute (5=101), other=read/execute (5=101). Understanding that octal 7 = binary 111 (all three permission bits set) and octal 0 = binary 000 (no permissions) requires number base conversion. A converter showing that decimal 493 = octal 755 = binary 111 101 101 makes the three-permission-group structure of Unix permissions visually clear.
Memory Addresses and Debugging
Debuggers, disassemblers, and memory inspection tools express addresses in hexadecimal (0x7FFF5FBE0000). Assembly language references registers and offsets in hex. When examining a memory dump or stack trace with addresses like 0x1A3F, a number system converter shows the decimal (6719) and binary (0001 1010 0011 1111) equivalents. For alignment calculations (is this address 16-byte aligned?), checking that the last 4 binary bits are all 0 is easier than checking divisibility by 16 in decimal.
Computer Science Education and Coursework
Computer science courses on digital logic, computer architecture, and assembly language require fluency in number base conversion. Students converting binary to hex for machine code representation, or decimal to binary for two's complement practice, use a converter to check homework answers. Teachers demonstrating base conversions — showing that 0xFF = 255 = 11111111 and that 0x100 = 256 = 1 0000 0000 — use live converters during lectures to make the relationships immediate and interactive.
How It Works
Number Base Conversion Algorithms: Decimal to Binary: Repeatedly divide by 2, collect remainders (right to left): 13 ÷ 2 = 6 R1 → bit 0 = 1 6 ÷ 2 = 3 R0 → bit 1 = 0 3 ÷ 2 = 1 R1 → bit 2 = 1 1 ÷ 2 = 0 R1 → bit 3 = 1 Result: 1101 (read remainders bottom to top) JavaScript: (13).toString(2) = "1101" Decimal to Hex: Same algorithm but divide by 16: 255 ÷ 16 = 15 R15 (F) → digit 0 = F 15 ÷ 16 = 0 R15 (F) → digit 1 = F Result: FF (= 255) JavaScript: (255).toString(16).toUpperCase() = "FF" Decimal to Octal: Divide by 8: 255 ÷ 8 = 31 R7 → digit 0 = 7 31 ÷ 8 = 3 R7 → digit 1 = 7 3 ÷ 8 = 0 R3 → digit 2 = 3 Result: 377 (octal) = 255 (decimal) JavaScript: (255).toString(8) = "377" Binary to Hex (shortcut): Group binary into nibbles (4 bits), convert each to hex digit: 1111 0000 → F0 1010 0011 → A3 (4 binary digits always = 1 hex digit) Any base to decimal: sum(digit[i] × base^position) from right Binary 1101: 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8+4+0+1 = 13 Hex 1A: 1×16¹ + 10×16⁰ = 16+10 = 26
Frequently Asked Questions
Why do computers use binary and not decimal?▼
What is the relationship between binary and hexadecimal?▼
What are octal numbers used for today?▼
How do I convert a hex color code to RGB?▼
What is two's complement and how does binary represent negative numbers?▼
Related Tools
Explore other tools in this category.
JSON Formatter
Validate JSON syntax, format with two-space indentation, or minify a parsed document.
JSON Format Corrector
Automatically fix invalid or messy JSON, Python dictionaries, unquoted keys, single quotes, and trailing commas. Includes interactive tree visualization and code generator.
Password Strength Checker
Analyze how secure your password is and generate a strong one instantly.
CSS Unit Converter
Convert between CSS units: px, rem, em, pt, vw, vh, cm, mm, and inches.
Binary ? Text Converter
Convert plain text to binary code and decode binary back to readable text.
Text to Binary Converter
Convert letters and strings into computer binary format.