Base Converter
Convert numbers between any base from 2 to 36 or use our Binary to Decimal converter.
How Number Base Conversion Works
A number base (or radix) defines how many unique digits a number system uses. Base-10 (decimal) uses digits 0–9, base-2 (binary) uses 0–1, base-8 (octal) uses 0–7, and base-16 (hexadecimal) uses 0–9 plus A–F. Bases above 16 extend the digit set further through the alphabet: base-36 uses 0–9 and A–Z, giving 36 unique symbols. To convert between any two bases, the standard approach is to first convert the source number to base-10 (decimal), then convert from base-10 to the target base.
Base Conversion Formula
To convert from base-b to decimal: Decimal = dₙ×bⁿ + dₙ₋₁×bⁿ⁻¹ + ... + d₁×b¹ + d₀×b⁰, where dᵢ is the value of each digit and b is the source base. To convert from decimal to base-t: repeatedly divide the decimal number by t and collect the remainders in reverse order. Each remainder becomes a digit in the target base (using A=10, B=11, ... Z=35 for digits above 9).
Worked Example: Convert 255 (Base-10) to Base-16
Step 1: Divide 255 by 16: quotient = 15, remainder = 15 (F). Step 2: Divide 15 by 16: quotient = 0, remainder = 15 (F). Step 3: Read remainders bottom-to-top: FF. So 255₁₀ = FF₁₆. Verification: F×16¹ + F×16⁰ = 15×16 + 15×1 = 240 + 15 = 255 ✓. Another example: 100₁₀ to base-8: 100 ÷ 8 = 12 R4, 12 ÷ 8 = 1 R4, 1 ÷ 8 = 0 R1 → 144₈.
Common Number Bases in Computing
Base-2 (Binary): The foundation of all digital computing. Each digit is a bit (0 or 1). Used in CPU instructions, memory addressing, and logic gates. Base-8 (Octal): Groups of 3 binary digits. Used in Unix file permissions (chmod 755) and some legacy systems. Base-10 (Decimal): The standard human number system. Used in everyday arithmetic and most user-facing applications. Base-16 (Hexadecimal): Groups of 4 binary digits. Used for memory addresses, color codes (#FF5733), MAC addresses, and byte-level data representation. Base-36: Maximum alphanumeric base using 0–9 and A–Z. Used in URL shorteners and compact ID encoding.
Technical Details
This converter supports any integer base from 2 to 36. For bases above 10, letters A through Z represent digit values 10 through 35. The conversion is performed using JavaScript's built-in parseInt() for source-to-decimal and Number.toString() for decimal-to-target, both of which support bases 2–36 natively. Input is case-insensitive (ff and FF are both valid hexadecimal). The tool handles integers only — fractional base conversion requires a different algorithm involving repeated multiplication.
Frequently Asked Questions
What is a number base? A number base (radix) is the number of unique digits used in a positional number system. Base-10 uses ten digits (0–9), base-2 uses two (0–1), and so on. Why is hexadecimal used in computing? Because each hex digit maps to exactly 4 binary bits, making it a compact and readable way to represent binary data. One byte (8 bits) is always exactly 2 hex digits. What is the highest base this tool supports? Base-36, which uses digits 0–9 and letters A–Z. This is the maximum for single-character digit representation. Can I convert between two non-decimal bases directly? Yes — this tool converts between any two bases. Internally it converts through decimal as an intermediate step, but the result is the same as a direct conversion.