Skip to content

Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal. Free base converter.

What is Number Base Conversion?

Number base conversion is the process of translating a number from one positional numeral system to another. The four most common bases in computing are binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Binary is the fundamental language of computers, where all data is represented as sequences of 0s and 1s. Octal was historically used in Unix file permissions and some assembly languages. Decimal is the standard system humans use for everyday math. Hexadecimal is widely used in programming for memory addresses, color codes, MAC addresses, and byte-level data representation because it provides a compact way to express binary values. Understanding these number systems is essential for low-level programming, networking, and computer science.

How to Use This Tool

Enter a number in the input field and select the base it is written in using the "From Base" dropdown. Click "Convert" to see the number expressed in all four bases: binary, octal, decimal, and hexadecimal. The tool automatically handles common prefixes like 0b (binary), 0o (octal), and 0x (hexadecimal) by stripping them before conversion. Each result includes the appropriate prefix and a copy button for quick clipboard access. The hexadecimal output uses uppercase letters (A through F) for consistency.

Common Use Cases

  • Converting hex color codes to RGB decimal values or binary for low-level color manipulation
  • Translating Unix file permission values between octal (chmod 755) and binary representations
  • Debugging network protocols by converting between hex byte values and binary bit patterns
  • Understanding memory addresses and register values shown in hex by debuggers and profilers

Why Use a Client-Side Tool?

This number base converter runs entirely in your browser using native JavaScript number parsing. There are no server calls, no API dependencies, and no data transmission. The conversion is instant with zero network latency. This is especially useful during debugging sessions where you need to quickly translate between hex addresses and binary patterns without switching to a terminal or calculator app. The tool works offline once loaded and has no usage restrictions.

Frequently Asked Questions

Why is hexadecimal so common in programming?

Hexadecimal is popular because each hex digit represents exactly 4 binary bits, making it a compact and readable way to express binary data. A single byte (8 bits) can be written as just two hex digits instead of eight binary digits. This makes hex ideal for memory addresses, color codes (#FF0000), MAC addresses, and any context where you need to work with binary data in a human-readable form.

How do I read Unix file permissions in octal?

Unix file permissions use three octal digits representing owner, group, and others. Each digit is the sum of: 4 (read), 2 (write), and 1 (execute). So 755 means the owner has read+write+execute (7), while group and others have read+execute (5). Converting 7 to binary gives 111, confirming all three permission bits are set. Converting 5 gives 101, showing read and execute are on but write is off.

What is the maximum number this tool can convert?

This tool uses JavaScript's parseInt function, which can safely handle integers up to 2^53 - 1 (which is 9,007,199,254,740,991 in decimal). This covers the vast majority of practical use cases including 32-bit and most 64-bit values. For numbers larger than this limit, specialized big integer libraries would be needed for accurate conversion.