Number Base Converter

Need to convert between number systems? Our free Number Base Converter handles conversions between binary, decimal, hexadecimal, octal, and over 30 other bases instantly. Whether you're a programmer debugging memory addresses, a student learning about positional numeral systems, an electronics engineer working with digital circuits, or a mathematician exploring number theory, this tool provides accurate conversions with support for bases from 2 to 36. Convert binary to decimal for readability, decimal to hexadecimal for programming, or explore unusual bases like base-3, base-12, or base-36. The converter supports prefix notation (0x for hex, 0b for binary, 0o for octal) and handles large numbers with precision. All conversions happen instantly in your browser. No signups, no limits, completely free.

What is Number Base Converter?

A number base (or radix) is the number of unique digits—including zero—used to represent numbers in a positional numeral system. In everyday life, we use base-10 (decimal) with digits 0 through 9. However, computers use base-2 (binary) with only 0 and 1, programmers often use base-16 (hexadecimal) for compact representation of binary data, and Unix systems traditionally use base-8 (octal) for file permissions. Our converter supports any base from 2 to 36. Bases higher than 10 use letters of the alphabet to represent values 10 and above: A=10, B=11, C=12, and so on up to Z=35. The conversion process works by interpreting the input number in the source base, calculating its decimal equivalent as an intermediate step, then expressing that value in the target base. This ensures accuracy across all conversions and handles edge cases like leading zeros, large numbers, and fractional values (where supported).

Key features

Support for 30+ Bases — Convert between binary (base-2), octal (base-8), decimal (base-10), hexadecimal (base-16), and any base from 2 to 36. Perfect for programming, mathematics, cryptography, and specialized applications. Prefix Recognition — Enter numbers with standard prefixes (0b for binary, 0o for octal, 0x for hexadecimal) for quick recognition. The tool understands these conventions used in Python, JavaScript, C, Java, and other languages. Bidirectional Conversion — Convert from any supported base to any other supported base. No need to manually convert through decimal as an intermediate step. Large Number Support — Handle large numbers that might overflow standard calculators. The converter works with arbitrarily large integers (limited only by browser memory). Multi-Base Display — Convert to multiple bases simultaneously to see all representations side-by-side for easier debugging and comparison. Accurate Conversions — Manual base conversion is tedious and error-prone. Our tool handles all calculations instantly and accurately, eliminating mistakes in homework, programming, or professional work. Educational Value — Students can verify manual conversions, learn about different number systems, and understand place value concepts through hands-on experimentation. Free & Instant — No special software or expensive calculator needed. Access professional-grade conversion from any device with a web browser.

How it works

Using the Number Base Converter is straightforward: First, enter your number in the input field. You can include prefixes like 0b for binary (0b1010), 0o for octal (0o17), or 0x for hexadecimal (0xFF), or just enter the digits without a prefix. Next, select the source base - the base your input number is currently in. If you used a prefix, the tool may auto-detect this, but you can always manually specify for precision. Then, select the target base - the base you want to convert to. Choose from common bases (binary, octal, decimal, hexadecimal) or enter any base from 2 to 36. Click Convert to process. The tool converts your input by first calculating the decimal (base-10) equivalent as an intermediate value, then expressing that value in the target base. Finally, review your result. The converter displays the converted value, and you can copy it with one click. You can also convert to multiple bases simultaneously to see different representations of the same number.

Common use cases

Programming & Development — Convert between binary, hex, and decimal daily for memory addresses, color codes, bitwise operations, and debugging. Essential for low-level programming, embedded systems, and web development. Computer Science Education — Learn about number systems, practice conversions for exams, and understand how computers represent data at the binary level. Fundamental for computer architecture and digital logic courses. Electronics Engineering — Work with binary and hexadecimal for digital circuit design, FPGA programming, and microcontroller development. Convert between bases for signal processing and digital communications. Web Development — Use hexadecimal for CSS colors, understand binary for WebGL and canvas operations, work with base64 encoding for data URIs. Mathematics & Cryptography — Explore number theory, study positional numeral systems, and investigate properties of different bases. Useful for cryptography and algorithm research. System Administration — Understand Unix file permissions (octal), work with hex memory dumps, analyze binary log files and network protocols. Data Science — Convert between bases for data encoding, feature engineering, and working with binary datasets. Understand how data is stored at the bit level.

Why use Number Base Converter

Accurate Conversions — Manual base conversion is tedious and error-prone. Our tool handles all calculations instantly and accurately, eliminating mistakes in homework, programming, or professional work. Support for 30+ Bases — From binary (base-2) to base-36, our converter handles all common and many uncommon bases. Perfect for programming, mathematics, cryptography, and specialized applications. Prefix Recognition — Enter numbers with standard prefixes (0b, 0o, 0x) for quick recognition. The tool understands these conventions used in Python, JavaScript, C, Java, and other languages. Bidirectional Conversion — Convert from any supported base to any other supported base. No need to manually convert through decimal as an intermediate step. Large Number Support — Handle large numbers that might overflow standard calculators. The converter works with arbitrarily large integers (limited only by browser memory). Educational Value — Students can verify manual conversions, learn about different number systems, and understand place value concepts through hands-on experimentation. Professional Use — Programmers, engineers, and scientists regularly need to convert between bases for debugging, data analysis, and system design. Free & Accessible — No special software or expensive calculator needed. Access professional-grade conversion from any device with a web browser.

Who should use this tool

Programmers & Developers — Convert between binary, hex, and decimal daily for memory addresses, color codes, bitwise operations, and debugging. Essential for low-level programming, embedded systems, and web development. Computer Science Students — Learn about number systems, practice conversions for exams, and understand how computers represent data at the binary level. Fundamental for computer architecture and digital logic courses. Electronics Engineers — Work with binary and hexadecimal for digital circuit design, FPGA programming, and microcontroller development. Convert between bases for signal processing and digital communications. Web Developers — Use hexadecimal for CSS colors, understand binary for WebGL and canvas operations, work with base64 encoding for data URIs. Mathematicians — Explore number theory, study positional numeral systems, and investigate properties of different bases. Useful for cryptography and algorithm research. System Administrators — Understand Unix file permissions (octal), work with hex memory dumps, analyze binary log files and network protocols. Data Scientists — Convert between bases for data encoding, feature engineering, and working with binary datasets. Understand how data is stored at the bit level. Hobbyists & Makers — Arduino and Raspberry Pi enthusiasts working with digital sensors, LED displays, and communication protocols often need base conversions. Technical Writers — Create accurate documentation, tutorials, and specifications that involve multiple number bases. Ensure consistency in technical communications.

How to get started

Getting started with our Number Base Converter takes just seconds: Open the tool in any web browser. Chrome, Firefox, Safari, Edge, and all modern browsers work perfectly. No installation or downloads required. Enter your number in the input field. You can use prefixes like 0b for binary, 0o for octal, or 0x for hexadecimal, or enter plain digits. Select the source base - the base your number is currently in. The tool may auto-detect if you used a prefix. Select the target base - the base you want to convert to. Choose from common bases or enter any base from 2 to 36. Click the 'Convert' button. The calculator instantly processes your input and displays the result. Review the converted value and copy it to your clipboard with one click. Use the result in your code, documentation, or calculations.

Best practices

Use Prefix Notation — Use standard prefixes (0b, 0o, 0x) for instant recognition of the input base. This prevents errors and makes your input clearer. Verify Results — Always double-check critical conversions, especially when working with memory addresses or color codes. One digit error can cause significant problems. Understand Base Relationships — Remember that one hex digit = 4 binary bits, one octal digit = 3 binary bits. These relationships make mental conversion easier. Convert to Multiple Bases — When debugging, convert to multiple bases simultaneously to see all representations. This often reveals patterns and issues. Learn Common Conversions — Memorize common conversions like 255 = FF₁₆ = 11111111₂. This speeds up your work and builds intuition. Use for Education — Practice manual conversions first, then verify with the tool. This builds understanding while ensuring accuracy. Handle Large Numbers — For very large numbers, the tool uses optimized algorithms. Don't try to convert extremely large values manually. Check Validity — Ensure your input is valid for the source base. Binary numbers can't have digits >1, octal can't have 8 or 9.

Limitations to keep in mind

Integer Focus — This converter is optimized for integer values. Fractional numbers in different bases may have limited support or rounding. Base Range — Supports bases 2 through 36 only. Bases outside this range require different algorithms. Single Number — Converts one number at a time. For batch conversions, process numbers individually. Context Required — The tool converts mathematically but cannot determine if a conversion makes sense in your specific application context. Prefix Ambiguity — Legacy octal notation (leading zero) can be ambiguous. Use explicit 0o prefix for clarity. Browser Limits — Extremely large numbers (millions of digits) may be limited by browser memory and performance. Not a Calculator — This tool converts between bases but doesn't perform arithmetic operations. Calculate first, then convert. Validation — Invalid digits for a base will show errors. Ensure your input matches the selected source base.

Frequently asked questions

What is a number base and why do we need different bases?

A number base (or radix) is the number of unique digits—including zero—used to represent numbers in a positional numeral system. Common bases include: Base-2 (Binary) - Used by all digital computers. Only digits 0 and 1. Base-8 (Octal) - Used in early computing and Unix systems. Digits 0-7. Base-10 (Decimal) - Our everyday system. Digits 0-9. Base-16 (Hexadecimal) - Used in programming, memory addresses, color codes. Digits 0-9 and A-F. Different bases serve different purposes: Computing - Computers use binary because electronic circuits have two states (on/off). Programming - Hexadecimal is compact for representing binary data (one hex digit = four binary digits). Mathematics - Different bases help understand place value and number theory. Specialized Applications - Base-64 for encoding, base-36 for short URLs, balanced ternary for certain computing applications. Understanding bases is essential for programmers, computer engineers, mathematicians, and anyone working with digital systems. Our converter supports 30+ bases from base-2 to base-36.

How do I convert between binary, decimal, and hexadecimal?

Converting between common bases follows systematic methods: Binary to Decimal - Multiply each bit by 2^position and sum. Example: 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11₁₀. Decimal to Binary - Divide by 2 repeatedly, collect remainders. 11 ÷ 2 = 5 remainder 1, 5 ÷ 2 = 2 remainder 1, 2 ÷ 2 = 1 remainder 0, 1 ÷ 2 = 0 remainder 1. Reading up: 1011₂. Binary to Hexadecimal - Group binary digits into sets of four (from right), convert each to hex. 1011₂ = B₁₆. Hexadecimal to Binary - Convert each hex digit to four binary digits. B₁₆ = 1011₂. Hexadecimal to Decimal - Multiply each digit by 16^position and sum. B₁₆ = 11×16⁰ = 11₁₀. Decimal to Hexadecimal - Divide by 16 repeatedly. 11 ÷ 16 = 0 remainder 11 (B). Result: B₁₆. Our converter automates all these calculations instantly and accurately.

What are the most common number bases used in computing?

Computing relies on several number bases: Binary (Base-2) - The fundamental language of computers. All data and instructions are ultimately stored as sequences of 0s and 1s. Used in: Machine code, memory addressing, logic gates, bitwise operations. Octal (Base-8) - Historically important in early computing. Still used for: Unix/Linux file permissions (chmod 755), some programming languages (C, Python support octal literals with 0o prefix). Decimal (Base-10) - The human-readable format. Used for: User interfaces, financial calculations, display output. Most programming converts to decimal for presentation. Hexadecimal (Base-16) - The programmer's best friend. Compact representation of binary. Used for: Memory addresses, color codes (#FF5733), MAC addresses, Unicode characters, debugging binary data. One hex digit represents exactly 4 bits (a nibble). Base-64 - Used for encoding binary data as text. Common in: Email attachments, URL parameters, data URIs, cryptographic keys. Each base has its strengths, and modern computing uses all of them in different contexts.

How are number bases used in programming and web development?

Number bases appear throughout programming: Color Codes - CSS uses hexadecimal: #RRGGBB format (e.g., #FF5733 for coral red). Memory Addresses - Pointers and memory locations displayed in hex: 0x7ffeefbff7ac. Bit Manipulation - Binary operations for flags and permissions: flags = 0b1010. File Permissions - Unix uses octal: chmod 755 file.txt. Encoding - Base64 for data transmission, URL-safe base64 for web. Cryptography - Hex for hashes: SHA-256 produces 64 hex characters. Bitmasks - Binary for feature flags: const FEATURE_A = 0b0001. IP Addresses - Dotted decimal notation: 192.168.1.1. UUIDs/GUIDs - Hex with dashes: 550e8400-e29b-41d4-a716-446655440000. Programming Language Support: Python - 0b1010 (binary), 0o755 (octal), 0xFF (hex). JavaScript - 0b1010, 0o755, 0xFF. C/C++ - 0755 (octal), 0xFF (hex). Java - 0b1010, 0755, 0xFF. Understanding these notations is essential for debugging, system programming, and working with low-level data.

What is the relationship between binary and hexadecimal?

Binary and hexadecimal have a special relationship that makes conversion between them straightforward: Each hexadecimal digit represents exactly 4 binary digits (bits). This is because 16 = 2⁴. Conversion Table: 0₁₆ = 0000₂, 1₁₆ = 0001₂, 2₁₆ = 0010₂, ..., 9₁₆ = 1001₂, A₁₆ = 1010₂, B₁₆ = 1011₂, C₁₆ = 1100₂, D₁₆ = 1101₂, E₁₆ = 1110₂, F₁₆ = 1111₂. Converting Binary to Hex: Group binary digits into sets of 4 from the right. Example: 110101111₂ → 0001 1010 1111 → 1AF₁₆. Converting Hex to Binary: Replace each hex digit with 4 binary digits. Example: 1AF₁₆ → 0001 1010 1111 → 110101111₂. Why This Matters: Compactness - Hex is 4× more compact than binary. Readability - Easier to read and transcribe. Memory Efficiency - One byte (8 bits) = exactly 2 hex digits. Alignment - Hex digits align with byte boundaries. This relationship is why hexadecimal is the preferred base for representing binary data in programming and computing.

Can I convert to uncommon bases like base-3, base-5, or base-36?

Yes! Our converter supports bases from base-2 to base-36. Here are some interesting applications of less common bases: Base-3 (Ternary) - Three states: 0, 1, 2. Used in balanced ternary computing (Soviet Setun computer). More efficient for some algorithms theoretically. Base-5 (Quinary) - Historically used in some counting systems. Used in some mathematical puzzles. Base-12 (Duodecimal) - Advocates claim it's superior to decimal (divisible by 2, 3, 4, 6). Used in some traditional systems (dozen, gross). Base-20 (Vigesimal) - Used in some cultures historically (counting fingers and toes). Base-26 - Using letters A-Z. Used in Excel column naming (A, B, C, ... Z, AA, AB...). Base-36 - Digits 0-9 plus A-Z. Used for: Short URLs, compact identifiers, encoding large numbers in fewer characters. Base-58 - Bitcoin addresses (excludes similar-looking characters 0, O, I, l). Base-62 - Similar to base-64 but without padding characters. Our converter handles all these bases and more, making it useful for cryptography, puzzles, specialized computing, and mathematical exploration.

What are the common prefixes and notations for different bases?

Different contexts use various notations to indicate number bases: Programming Languages: Binary - 0b or 0B prefix: 0b1010 = 10 decimal. Octal - 0o or 0O prefix (modern), leading 0 (legacy): 0o17 = 15 decimal. Hexadecimal - 0x or 0X prefix: 0xFF = 255 decimal. Mathematical Notation: Subscript notation: 1011₂, 255₁₀, FF₁₆. Explicit base: (255)₁₀, (FF)₁₆. Web and Computing: Hex color codes - # prefix: #FF5733. HTML entities - &#x prefix: ✓ = checkmark. Unicode - U+ prefix: U+1F600 = emoji. Assembly Language: Binary - b suffix: 1010b. Octal - o or q suffix: 17o. Hexadecimal - h suffix: FFh (must start with digit: 0FFh). Various Conventions: % prefix for binary in some assemblers. $ prefix for hex in some systems. &H prefix for hex in BASIC. &O prefix for octal in BASIC. Understanding these notations helps when reading code, documentation, and technical specifications from different sources and time periods.

How do I detect the base of an unknown number?

Identifying an unknown number's base involves pattern recognition: Look for Prefixes: 0b or 0B → Binary, 0o or 0O → Octal, 0x or 0X → Hexadecimal, # → Hex color code. Examine the Digits: Only 0 and 1 → Likely binary. Digits 0-7 only → Could be octal or higher. Digits 0-9 → Could be decimal or higher. Contains A-F → Hexadecimal (or base-16+). Contains letters beyond F → Base-17 or higher. Consider the Context: Memory addresses → Usually hexadecimal. File permissions → Usually octal. Colors → Hexadecimal. Mathematical context → Could be any base. Check for Validity: Binary numbers with digits >1 are invalid. Octal numbers with 8 or 9 are invalid. Hex numbers with letters >F are invalid. When in Doubt: Try converting from likely bases and see if the result makes sense. Check if the number fits expected ranges. Our converter accepts input with prefixes (like 0xFF) and auto-detects the base, or you can manually specify the source base for precise control.

Related tools