Base Converter
Convert numbers between different bases (2-62) with support for negative and fractional numbers
• Base 2-62 supported using 0-9, A-Z, a-z character set
• Click × to remove a base from the conversion list
• More bases = more conversion results
- Select the source base (the base your number is currently in)
- Enter your number using valid characters for the selected base
- Choose target bases to convert to
- View real-time conversion results
- Copy individual results or all results to clipboard
• Bases 2-10: Use digits 0-9
• Bases 11-36: Use digits 0-9 and letters A-Z
• Bases 37-62: Use digits 0-9, letters A-Z, and letters a-z
Supported Features
- Convert between any bases 2-62
- Support for negative numbers
- Support for fractional numbers (decimal input only)
- Real-time conversion as you type
- Copy results to clipboard
- Customizable target bases
Limitations
- Fractional input only supported in decimal (base 10)
- Maximum input length: 1000 characters
- Fractional precision: 10 decimal places
- Very large numbers may have performance impact
- JavaScript number precision limits apply
🔢 What is a Number Base?
A number base (or radix) determines how many unique digits are used to represent numbers. In our daily lives, we use base 10 (decimal) with digits 0-9.
🎯 Key Concepts:
- • Place Value: Each position represents a power of the base
- • Radix Point: Separates integer and fractional parts
- • Digits: Numbers 0 to (base-1)
- • Positional Notation: Value = digit × base^position
💡 Why Different Bases?
- • Efficiency: Binary is natural for computers
- • Compactness: Higher bases need fewer digits
- • Specialization: Different bases for different tasks
- • Compatibility: Match specific hardware/software needs
🔄 Conversion Methods
From Any Base to Decimal
Method: Multiply each digit by base^position and sum
Example: 101₁₁₂ = 1×2² + 0×2¹ + 1×2⁰ = 5₁₀
Example: A₁₆ = 10×16⁰ = 10₁₀
From Decimal to Any Base
Method: Repeated division by the target base
Example: 10₁₀ ÷ 2 = 5 remainder 0
Example: 5₁₀ ÷ 2 = 2 remainder 1
Example: 2₁₀ ÷ 2 = 1 remainder 0
Result: 101₀₁ (reading remainders up)
📋 Common Number Systems
Binary (Base 2)
The foundation of all computing. Every computer operation uses binary because electronic circuits can be in only two states: on (1) or off (0).
Real-world uses: CPU instructions, file storage, network protocols
Quick tip: 1KB = 1024 bytes (2¹⁰)
Example: 10₁₀ = 1010₂, 255₁₀ = 11111111₂
Octal (Base 8)
Represents 3 binary digits with one character. Used in early computing systems when memory was expensive and binary was too verbose.
Unix permissions: 755 = rwxr-xr-x (owner: rwx, group: r-x, others: r-x)
Memory addressing: Historical computer architectures
Example: 10₁₀ = 12₈, 64₁₀ = 100₈
Decimal (Base 10)
The most natural number system for humans, evolved from counting on ten fingers. Used worldwide for everyday calculations, commerce, and communication.
Historical: Originated in ancient India, spread via Arabic mathematicians
Universal: Standard for international business and science
Example: 42 = 4×10¹ + 2×10⁰ = 42₁₀
Hexadecimal (Base 16)
The universal language of programmers. Perfect compromise between binary and human readability. One hex digit = 4 binary digits, making it ideal for memory representation.
Web colors: #FF0000 = Red, #00FF00 = Green, #0000FF = Blue
Memory addresses: 0x7FFF = common memory upper bound
Example: 255₁₀ = FF₁₆ = 11111111₂
Base 32
Encodes 5 binary digits with one character. Uses only uppercase letters and numbers 2-7, avoiding ambiguous characters that could be confused (0/O, 1/I).
Advantages: Case-insensitive, no special characters, URL-safe
Applications: Google Authenticator, Microsoft software keys
Example: 10₁₀ = A₃₂, 1000₁₀ = 78₃₂
Base 62
The most compact alphanumeric encoding. Uses all digits, uppercase and lowercase letters (62 characters total). Perfect for creating short, memorable identifiers.
URL shorteners: bit.ly, tinyurl.com use base 62 variants
YouTube videos: IDs like dQw4w9WgXcQ are base 62 encoded
Example: 1000000₁₀ = 4c92₆₂ (much shorter than decimal)
📊 Quick Reference Conversions
Decimal 255 (8-bit max):
Binary: 11111111₂
Octal: 377₈
Hexadecimal: FF₁₆
Base 32: 7Q₃₂
Base 62: 3Q₆₂
Decimal 1024 (1KB):
Binary: 10000000000₂
Octal: 2000₈
Hexadecimal: 400₁₆
Base 32: 340₃₂
Base 62: GW₆₂
💾 Power of 2 Reference (Important for Computing)
| Power | Value | Binary | Hex | Common Use |
|---|---|---|---|---|
| 2⁸ | 256 | 100000000 | 100 | Byte values |
| 2¹⁰ | 1,024 | 10000000000 | 400 | 1KB (Kilobyte) |
| 2¹⁶ | 65,536 | 10000000000000000 | 10000 | 64KB (old memory limit) |
| 2³² | 4,294,967,296 | 100000000000000000000000000000000 | 100000000 | 4GB (32-bit address space) |
🎯 Practical Tips & Tricks
Quick Mental Math
- • Hex ↔ Binary: Each hex digit = 4 binary digits
- • Octal ↔ Binary: Each octal digit = 3 binary digits
- • Hex to Decimal: A×16 + B for two-digit hex AB
- • Binary to Octal: Group binary in sets of 3 from right
Common Patterns
- • 255 = FF₁₆ = 11111111₂ (8 bits all 1s)
- • 1024 = 400₁₆ (Start of KB scale)
- • 4095 = FFF₁₆ (12 bits all 1s)
- • 65535 = FFFF₁₆ (16 bits all 1s)
🔬 Advanced Concepts
📐 Fractional Numbers
Converting fractions between bases requires multiplying by the base repeatedly. Some fractions terminate in one base but repeat in others (e.g., 0.1₁₀ = 0.0001100110011...₂)
🎭 Negative Numbers
Different systems handle negatives differently: sign-magnitude, ones complement, or two's complement (used in most modern computers).
⚡ Performance
Base conversion is computationally expensive. For high-performance applications, use lookup tables or bit manipulation tricks instead of division algorithms.