Engineering Tools
Verified Tool

Number Base Converter

Convert binary, octal, decimal, hex

Last Updated: March 2, 2026
avatarBy Viblaa Team

4 number bases

Reference table

Instant conversion

The color code is #FF5733—what's that in RGB decimal? The IP address in binary has a specific pattern—what's 11000000.10101000.00000001.00000001 in dotted decimal? The assembly reference shows 0x7FFF—what's that in decimal?

Number base conversion is fundamental to computing, networking, and digital systems. This calculator converts between binary, decimal, hexadecimal, octal, and any base from 2 to 36.

What is Number Base Conversion?

Number base conversion transforms how a quantity is represented between different numeral systems. Our everyday decimal uses base 10. Computers use binary (base 2). Programmers use hex (base 16) for compact binary representation.

Common bases:

Binary (base 2): 0, 1
Octal (base 8): 0-7
Decimal (base 10): 0-9
Hexadecimal (base 16): 0-9, A-F

Examples:
255 decimal = 11111111 binary = FF hex = 377 octal
Hex = Compact Binary

Each hex digit represents exactly 4 binary digits. FF = 1111 1111. This is why programmers prefer hex—it's human-readable binary.

Why People Actually Need This Tool

Computers Think in Binary

Every computer operation is fundamentally binary. Hex and octal are human-friendly ways to work with binary data.

  1. Programming — Convert between hex, decimal, and binary.

  2. Color codes — Translate between hex colors and RGB values.

  3. Networking — Convert IP addresses and subnet masks.

  4. Electronics — Work with binary data and addressing.

  5. Permissions — Understand Unix octal permissions (chmod 755).

  6. Memory addresses — Read hex memory dumps.

  7. Data encoding — Convert character codes between bases.

How to Use the Number Base Converter

  1. Enter number — In your source base format.

  2. Select source base — Binary, decimal, hex, octal, or custom.

  3. Select target base — What format you want.

  4. View result — Converted value, often with multiple base outputs.

BaseDigits UsedPrefixCommon Use
Binary (2)0, 10bMachine code, bit manipulation
Octal (8)0-70oUnix permissions
Decimal (10)0-9noneHuman numbers
Hex (16)0-9, A-F0x or #Memory, colors, programming
Base 360-9, A-ZvariesURL shorteners, compact IDs
Letter Case in Hex

Hex digits A-F can be uppercase or lowercase. FF = ff = Ff. Be consistent for readability.

Real-World Use Cases

1. The Color Conversion

Context: CSS color #3498DB. Need RGB values for image editor.

Problem: Convert hex to decimal RGB.

Solution: 34 hex = 52, 98 hex = 152, DB hex = 219. RGB(52, 152, 219).

Outcome: Color matched across different applications.

2. The Unix Permissions

Context: chmod 755 on a file. What permissions is that?

Problem: Understand octal permission number.

Solution: 7 = 111 (rwx), 5 = 101 (r-x). So: rwxr-xr-x.

Outcome: Permission structure understood.

3. The IP Address

Context: Subnet mask 255.255.255.0 in binary.

Problem: What's the binary pattern?

Solution: 255 = 11111111. Mask = 11111111.11111111.11111111.00000000.

Outcome: Network/host bit boundary visible in binary.

4. The Memory Address

Context: Debugger shows address 0x7FFFFFFF.

Problem: What's that in decimal?

Solution: 0x7FFFFFFF = 2,147,483,647 (max signed 32-bit integer).

Outcome: Understanding of memory layout.

5. The Bitwise Operation

Context: Need to set bit 5 (0-indexed) in a byte.

Problem: What value to OR with?

Solution: Bit 5 = 2^5 = 32 decimal = 0x20 = 0b00100000.

Outcome: Correct mask for bit manipulation.

6. The ASCII Code

Context: Character 'A' in various representations.

Problem: What are the values?

Solution: 'A' = 65 decimal = 41 hex = 101 octal = 1000001 binary.

Outcome: Character encoding understood across bases.

7. The Short URL

Context: Need to encode ID 12345678 compactly.

Problem: Represent in base 36 for URL.

Solution: 12345678 base 10 = 7CLZI base 36 (5 characters vs 8).

Outcome: Compact URL encoding achieved.

Common Mistakes and How to Avoid Them

Leading Zeros Matter in Some Contexts

In most math, 007 = 7. In some programming languages, 007 might be interpreted as octal (= 7 decimal anyway, but 010 octal = 8 decimal).

Confusing Hex Letters
❌ The Mistake
Reading B as 12 instead of 11 (B=11, not 12).
✅ The Fix
A=10, B=11, C=12, D=13, E=14, F=15. Not 11-16.
Forgetting Position Weights
❌ The Mistake
Calculating 101 binary as 1+0+1=2 instead of 4+0+1=5.
✅ The Fix
Each position has weight: 2⁰, 2¹, 2². So 101 = 4+0+1 = 5.
Using Wrong Base Prefix
❌ The Mistake
Writing 0x10 when you mean binary 10 (should be 0b10).
✅ The Fix
0x = hex, 0b = binary, 0o = octal. No prefix usually means decimal.
Octal vs Decimal Confusion
❌ The Mistake
Treating 010 as ten when language interprets as octal (= 8).
✅ The Fix
In many languages, leading 0 means octal. 010 = 8, not 10.
Case Sensitivity in Hex
❌ The Mistake
Worrying that FF ≠ ff (they're equal in value).
✅ The Fix
Hex is case-insensitive for value. Style preference determines case.

Privacy and Data Handling

This Number Base Converter operates entirely in your browser.

  • No conversions are sent to any server.
  • No data is stored.
  • No account required.
  • Works completely offline.

Your data stays private.

Conclusion

Number base conversion is essential for anyone working with computers, networks, or digital systems. Understanding binary, hex, and octal representations demystifies how computers actually work.

This converter handles any base from 2 to 36. Enter a number, get equivalents in all common bases, or specify exactly what conversion you need.

Speak the language of machines.

Frequently Asked Questions