Base Converter (Radix)
Simultaneously convert a number between Decimal, Binary, Hex, and Octal.
How to Use
Enter a number in any base
Type a value in decimal, binary, hexadecimal, or octal — all fields update automatically.
View all four base representations
See the equivalent value in all four number systems simultaneously in one step.
Use hex letters A-F freely
Hexadecimal input accepts both upper and lowercase letters A through F.
Rely on BigInt precision
Large 64-bit programming values convert accurately without floating-point rounding errors.
What are Number Bases?
A number base specifies how many unique digits are used to represent numbers. Base conversion is a core computer science skill.
Real-World Examples & Use Cases
Computer Science Education and Programming
Computer science students learn that all data at the hardware level is binary — but reading long binary strings is impractical. Hexadecimal serves as a compact binary shorthand: each hex digit represents exactly 4 binary bits. A byte (8 bits) requires 8 binary digits but only 2 hex digits: 11001010 = 0xCA = 202 decimal. Students learning about data types, bit masking, memory addresses, and instruction sets convert constantly between these representations to understand what programs are actually doing at the machine level.
Color Codes in Web and Graphic Design
CSS and web design use hexadecimal color codes: #FF5733 means Red=0xFF=255, Green=0x57=87, Blue=0x33=51. Understanding that #FF0000 is pure red (Red=255, Green=0, Blue=0) and #808080 is medium gray (128, 128, 128) requires decimal-hex conversion. Graphics designers adjusting color values in code and converting between hex color codes and RGB decimal values use base conversion constantly. The relationship between 0x00-0xFF and 0-255 is central to digital color theory.
Memory Addresses and Pointer Arithmetic
Debuggers, disassemblers, and system-level programming tools display memory addresses in hexadecimal: 0x7FFF5FBFF8A0. Calculating address offsets requires hex arithmetic. An array element at 0x1000 with each element 4 bytes apart: element[5] is at 0x1000 + (5 × 4) = 0x1000 + 0x14 = 0x1014 = 4116 decimal. Systems programmers and embedded engineers convert addresses, register values, and flag bits between binary/hex/decimal throughout development and debugging workflows.
File Permissions in Unix/Linux Systems
Unix file permissions are represented in octal: chmod 755 sets owner (read+write+execute = 4+2+1 = 7), group (read+execute = 4+1 = 5), others (read+execute = 5). Understanding that 777 = 0b111_111_111 (all bits set for all groups) and 644 = 0b110_100_100 (owner read/write, group and others read-only) requires octal-to-binary conversion. System administrators setting file permissions, umask values, and special bits (setuid=4000, setgid=2000, sticky=1000) work with octal representations directly.
How It Works
Base conversion algorithms: Decimal to any base B: 1. Divide decimal number by B, record remainder 2. Repeat with quotient until quotient = 0 3. Read remainders bottom-to-top for the result Example: Decimal 156 to Binary (Base 2): 156 ÷ 2 = 78 R0 78 ÷ 2 = 39 R0 39 ÷ 2 = 19 R1 19 ÷ 2 = 9 R1 9 ÷ 2 = 4 R1 4 ÷ 2 = 2 R0 2 ÷ 2 = 1 R0 1 ÷ 2 = 0 R1 Binary: 10011100 = 0x9C (hex) = 234 (octal) Any base to decimal: Multiply each digit by its base position value and sum: 10011100 binary = 1×2^7 + 0×2^6 + 0×2^5 + 1×2^4 + 1×2^3 + 1×2^2 + 0×2^1 + 0×2^0 = 128 + 0 + 0 + 16 + 8 + 4 + 0 + 0 = 156 Hex shortcut: each hex digit = 4 binary bits 0-9: same as decimal; A=10, B=11, C=12, D=13, E=14, F=15
Frequently Asked Questions
Why do computers use binary instead of decimal?▼
Why is hexadecimal used in programming instead of binary?▼
What do 0x and 0b prefixes mean in code?▼
How are colors represented in hexadecimal?▼
What is BigInt and why is it needed for base conversion?▼
Related Tools
Explore other tools in this category.
Number to Words Converter
Convert any number into its full English word representation.
Roman Numeral Converter
Convert between Arabic numbers and Roman numerals instantly in both directions.
Ohm's Law Calculator
Calculate voltage, current, resistance, and power using Ohm's Law and the power formula.
Percentage Calculator
Calculate percentages, increases, and decreases instantly.
LCM & GCF Calculator
Calculate the Least Common Multiple and Greatest Common Factor of numbers.
Prime Number Checker
Check if a number is prime or composite instantly.