Upgrade to Premium — no ads, more power! ⚡ — Learn more

Number Base Converter

Number Input

Base 10 (0-9)

Enter a valid number for the selected base

Enter a number and click Convert to All Bases

Let us know

Please share your experience

Decoding #FF7A00 and 192.168.1.1

Take the color #FF7A00: FF is 255, 7A is 122, and 00 is 0 — so the RGB triple is (255, 122, 0). The same tool answers binary questions instantly: 1010 in binary is 10 in decimal and A in hex. An IPv4 address like 192.168.1.1 converts to C0.A8.01.01 in hex, because each of the four octets is one byte, and one byte is always two hex digits.

Leading Zeros, Octal Permissions, and Hex Letters

Three classic traps: first, leading zeros matter in fixed-width contexts — an 8-bit register reading 00001010 is not the same claim as '1010' written loosely, because width defines the value range. Second, Unix permission 0777 is octal and equals 511 in decimal, not 777. Third, hex counts past nine with letters: A is 10, B is 11, up to F is 15, so a single hex digit holds exactly four binary digits.

About Number Base Converter

Base conversion is daily work for developers: CSS colors like #FF7A00 are hexadecimal RGB values, Unix file permissions are written in octal (0777), memory addresses and error codes appear as hex in debuggers, and bitmasks encode sets of on/off flags. Computer science students meet the same conversions in their first semester, and network engineers deal with them whenever dotted-decimal IP addresses need to become raw 32-bit values.

How to Use

1

Step 1

Select the input base: Binary (2), Octal (8), Decimal (10), or Hexadecimal (16)

2

Step 2

Enter your number in the input field (valid characters depend on base)

3

Step 3

Click 'Examples' to load pre-made numbers for quick testing

4

Step 4

Click 'Reference' to view common conversions table (0-1024)

5

Step 5

Click 'Convert to All Bases' to see results in all four bases

6

Step 6

View conversion information showing input base, value, and decimal equivalent

7

Step 7

Click 'Copy' next to any result to copy to clipboard

8

Step 8

Use the copied values in your programming, homework, or projects

Features & Benefits

  • ✅Convert between 4 number bases: Binary, Octal, Decimal, Hexadecimal
  • ✅Input any base and convert to all bases simultaneously
  • ✅Automatic input validation for selected base
  • ✅Binary (Base 2): digits 0-1
  • ✅Octal (Base 8): digits 0-7
  • ✅Decimal (Base 10): digits 0-9
  • ✅Hexadecimal (Base 16): digits 0-9, A-F
  • ✅Common conversions reference table with 15 rows (0 to 1024)
  • ✅5 number examples: binary, octal, decimal, hexadecimal, large binary
  • ✅Shows input base, input value, and decimal equivalent
  • ✅Individual copy buttons for each base result
  • ✅Real-time validation with error messages
  • ✅Handles large numbers (up to JavaScript's safe integer limit)
  • ✅Uppercase hexadecimal output (A-F, not a-f)
  • ✅100% browser-based - numbers never sent to server
  • ✅100% free - no limits, no signup required

FAQs

What are number bases?

Number bases (or radix) are different ways to represent numbers. Binary (base 2) uses 0-1, Octal (base 8) uses 0-7, Decimal (base 10) uses 0-9, and Hexadecimal (base 16) uses 0-9 and A-F. Computers use binary internally, while hexadecimal is common in programming for colors, memory addresses, and compact representation.

Why do programmers use different bases?

Binary represents how computers store data (bits: 0 or 1). Hexadecimal is compact and easy to convert to/from binary (each hex digit = 4 bits), making it perfect for memory addresses, colors (#FF00AA), and debugging. Octal was historically used in Unix file permissions (chmod 755). Decimal is what humans naturally use.

How do I convert between bases manually?

To convert to decimal: multiply each digit by base^position and sum. To convert from decimal: repeatedly divide by target base and collect remainders. For example, binary 1010 to decimal: (1×8)+(0×4)+(1×2)+(0×1) = 10. This tool does it instantly for you!

What characters are valid for each base?

Binary (base 2): only 0 and 1. Octal (base 8): 0-7. Decimal (base 10): 0-9. Hexadecimal (base 16): 0-9 and A-F (or a-f, case insensitive input). The tool validates your input and shows an error if you use invalid characters for the selected base.

Can I convert negative numbers?

This tool currently supports positive integers only. Negative numbers in different bases require signed number representations like two's complement (for binary), which is more complex. For most use cases (colors, addresses, simple conversions), positive integers are sufficient.

What's the largest number I can convert?

The tool can handle numbers up to JavaScript's safe integer limit (2^53 - 1, or 9,007,199,254,740,991 in decimal). This is large enough for most practical purposes. Larger numbers may lose precision due to JavaScript's number representation.

Why is hexadecimal used for colors?

Hexadecimal is perfect for colors because each color channel (Red, Green, Blue) uses 8 bits (0-255 in decimal, 00-FF in hex). A color like #FF00AA means: Red=FF (255), Green=00 (0), Blue=AA (170). It's compact and easy to read once you're familiar with it.

What are the examples for?

Click 'Examples' to load pre-made numbers: Binary (11010110 = 214), Octal (755 = 493), Decimal (1024), Hexadecimal (FF00AA = 16711850, a color code), and Large Binary (1111111111111111 = 65535). Great for learning or testing the converter.

What's in the reference table?

The reference table shows common conversions for 15 decimal numbers (0, 1, 2, 8, 10, 15, 16, 32, 64, 100, 128, 255, 256, 512, 1024) in all four bases. These are frequently used values in programming (powers of 2, byte boundaries, etc.). Click 'Reference' to view it.

Can I use this for homework or exams?

Yes! This tool is perfect for checking your work on computer science or math homework. However, we recommend learning the manual conversion process first, then using this tool to verify your answers. Understanding how base conversion works is important for programming and computer science.

Is my data secure?

Yes! All number conversions happen entirely in your browser using JavaScript. Your numbers never leave your device and are not sent to any server, ensuring complete privacy and security.