Number Base Converter
Convert numbers between binary, decimal, hexadecimal, and octal. Essential tool for programming and computer science.
Enter Number in Any Base
Quick Reference (0-16)
| Dec | Bin | Oct | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
What It Does
Number Base Converter converts numbers between different numeral systems (bases): binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Binary uses only 0 and 1, representing numbers in base-2 (essential for computers). Octal uses digits 0-7, representing numbers in base-8 (less common, used in some Unix file permissions). Decimal uses digits 0-9, representing numbers in base-10 (standard human numbering). Hexadecimal uses digits 0-9 and letters A-F, representing numbers in base-16 (widely used in programming for memory addresses, colors, and binary data representation). This tool provides instant conversion between all bases, displays all conversions simultaneously, and handles large numbers. Essential for programmers, computer science students, digital electronics engineers, and anyone working with low-level programming, memory addresses, bit manipulation, or understanding how computers represent numbers.
Key Features:
- Binary (base 2): Convert to/from binary using 0 and 1
- Octal (base 8): Convert to/from octal using digits 0-7
- Decimal (base 10): Convert to/from standard decimal numbers
- Hexadecimal (base 16): Convert to/from hex using 0-9 and A-F
- Simultaneous conversion: See all bases at once as you type
- Large number support: Handle very large integers
- Real-time updates: Conversions update instantly as you type
- Copy individual results: Copy any base format independently
How To Use
Enter a number in any base (binary, octal, decimal, or hexadecimal) and instantly see its equivalent in all other bases. Perfect for programming, computer science, and digital electronics.
Enter Number in Any Base
Type or paste a number in the input field for your chosen base. For binary, use only 0 and 1 (e.g., "1010"). For octal, use digits 0-7 (e.g., "755"). For decimal, use digits 0-9 (e.g., "255"). For hexadecimal, use digits 0-9 and letters A-F (e.g., "FF" or "ff").
View All Conversions
The tool automatically displays the equivalent number in all other bases simultaneously. As you type in one base, all other bases update in real-time. See binary, octal, decimal, and hexadecimal representations all at once.
Copy Result
Click the copy button next to any base format to copy that representation to your clipboard. Use it in your code, calculations, or documentation.
Pro Tips
- •Hexadecimal is commonly used for memory addresses (0x7FFF), colors (#FF0000), and binary data
- •Binary is essential for bitwise operations and understanding computer internals
- •Octal is less common but used in Unix file permissions (chmod 755)
- •Decimal is standard for human-readable numbers and calculations
- •Hexadecimal digits A-F represent decimal values 10-15
- •Leading zeros are preserved in conversions (important for fixed-width formats)
Benefits
Use Cases
Memory Address Conversion
Convert hexadecimal memory addresses to decimal for understanding and debugging. Example: Memory address 0x7FFF (hex) = 32767 (decimal) = 0111111111111111 (binary). Programmers use hex for memory addresses because they're more compact than binary and align with byte boundaries (2 hex digits = 1 byte). Convert between formats to understand pointer values, array indices, and memory layouts.
Hex: 0x7FFF → Decimal: 32767 → Binary: 0111111111111111Color Code Conversion
Convert hexadecimal color codes to decimal RGB values. Example: Color #FF0000 (red) in hex = RGB(255, 0, 0) in decimal. FF in hex = 255 in decimal, 00 = 0. Web colors use hex (#RRGGBB), but some APIs and graphics libraries use decimal RGB. Convert between formats for CSS, graphics programming, and color manipulation.
Hex: #FF5733 → RGB: (255, 87, 51) → Binary: 11111111 01010111 00110011Unix File Permissions
Convert octal file permissions to binary for understanding bit patterns. Example: chmod 755 in octal = 111 101 101 in binary. Each digit represents 3 bits: read (4), write (2), execute (1). 7 = 4+2+1 (all permissions), 5 = 4+1 (read+execute), 0 = no permissions. Understanding binary helps visualize permission bits and calculate permission values.
Octal: 755 → Binary: 111 101 101 → Decimal: 493Bitwise Operations
Convert numbers to binary for bitwise AND, OR, XOR operations. Example: 5 AND 3. 5 in binary = 101, 3 in binary = 011. AND operation: 101 AND 011 = 001 = 1 in decimal. Understanding binary is essential for bit flags, masks, and low-level programming. Convert results back to decimal to verify operations.
5 (101) AND 3 (011) = 1 (001)Data Representation
Understand how computers store numbers in different formats. Example: The number 255 can be represented as: 11111111 (binary, 8 bits), 377 (octal), 255 (decimal), FF (hexadecimal, 2 digits). All represent the same value but use different bases. This is crucial for understanding data types, byte order (endianness), and binary file formats.
255 = 11111111 (binary) = 377 (octal) = FF (hex)Frequently Asked Questions
1 Why do programmers use hexadecimal instead of binary?
2 How do I convert between bases manually?
3 What are the maximum values for different bit lengths?
4 Why is octal less common than hex?
5 Can I convert floating-point numbers?
Related Tools
Text to Binary/Hex
Convert text to binary, hexadecimal, octal, or decimal. Encode and decode text in multiple number systems.
Timestamp Converter
Convert between Unix timestamps and human-readable dates. Support for milliseconds and multiple time zones.
JSON to CSV Converter
Convert JSON arrays to clean CSV with headers and custom delimiters.
CSV to JSON Converter
Turn CSV rows into JSON arrays with optional headers and pretty formatting.
HTML ↔ Markdown Converter
Convert HTML to Markdown and Markdown to HTML bidirectionally. Perfect for documentation, blogs, and content migration.
Text Case Converters
Convert text to uppercase, lowercase, title case, camelCase, snake_case, and more. Perfect for formatting code, titles, and content.