Base Converter
Convert numbers between any base from 2 to 36
Common Bases
Base 2 - Binary
Digits: 0-1
Base 8 - Octal
Digits: 0-7
Base 10 - Decimal
Digits: 0-9
Base 16 - Hexadecimal
Digits: 0-9, A-F
Base 32
Digits: 0-9, A-V
Base 36
Digits: 0-9, A-Z
What Is Base Conversion?
Base conversion is the process of translating a number from one numeral system (base) to another. The base, or radix, determines how many unique digits are available to represent numbers. The most familiar base is 10 (decimal), which uses digits 0 through 9. Computers work primarily in base 2 (binary), using only 0 and 1. Other common bases include base 8 (octal), base 16 (hexadecimal), base 32, and base 36.
Each positional numeral system represents numbers as a sequence of digits, where each position's value is determined by raising the base to the power of that position. For example, the decimal number 255 can be expressed as 11111111 in binary, 377 in octal, and FF in hexadecimal. All four representations describe the same quantity; only the notation changes.
Base conversion is a fundamental skill in computer science, digital electronics, and programming. Developers routinely convert between decimal and hexadecimal when working with memory addresses, color codes, and hash values. Network engineers use hexadecimal and binary when configuring IP addresses and subnet masks. This converter supports any base from 2 to 36, using the standard digit set of 0-9 followed by A-Z for bases above 10.
Base Conversion Method
Converting between bases involves two steps: first converting the input number to decimal (base 10), then converting from decimal to the target base. Each step uses repeated division and remainder tracking.
Decimal to Target Base
Where:
- N= Number to convert
- b= Target base (2-36)
- remainder= Digit in the target base at each position
Common Number Bases
Different bases serve different purposes in computing and mathematics. Understanding when to use each base helps with debugging, data analysis, and system design.
| Base | Name | Digits | Common Use |
|---|---|---|---|
| 2 | Binary | 0-1 | Computer logic, bitwise operations |
| 8 | Octal | 0-7 | Unix file permissions, compact binary |
| 10 | Decimal | 0-9 | Everyday counting |
| 16 | Hexadecimal | 0-9, A-F | Color codes, memory addresses |
| 32 | Base32 | 0-9, A-V | TOTP secrets, file naming |
| 36 | Base36 | 0-9, A-Z | URL shorteners, compact IDs |
How to Use This Calculator
The base converter supports conversion between any two bases from 2 to 36:
- Set the source base: Click one of the common base buttons (2, 8, 10, 16, 32, 36) or type a number directly into the base input field.
- Set the target base: Click a base button or type a value for the destination base.
- Enter the number: Type your number in the input field. The calculator validates that all digits are valid for the selected source base.
- View the result: The converted number appears instantly in the output area, along with its decimal equivalent.
The calculator rejects invalid input — for example, entering a digit higher than 1 in binary mode — and displays an error message prompting you to correct the input.
Real-World Applications
Base conversion is indispensable in programming and software development. When debugging code, developers often need to inspect raw memory values in hexadecimal or interpret binary flags. Understanding how 0xFF in hex relates to 255 in decimal or 11111111 in binary helps developers reason about bitwise operations, mask values, and data encoding.
In web development, hexadecimal is the standard for specifying colors. A CSS color like #FF5733 represents red=255, green=87, blue=51 in decimal. Being able to mentally convert between hex and decimal helps designers and developers understand and manipulate color values without external tools.
Networking professionals work with IP addresses (dotted decimal) and subnet masks that require understanding binary. A subnet mask of 255.255.255.0 in decimal is 11111111.11111111.11111111.00000000 in binary, and recognizing this pattern is essential for calculating network ranges and understanding CIDR notation.
Worked Examples
Decimal 255 to Binary
Problem:
Convert the decimal number 255 to binary (base 2).
Solution Steps:
- 1255 ÷ 2 = 127 remainder 1
- 2127 ÷ 2 = 63 remainder 1
- 363 ÷ 2 = 31 remainder 1
- 431 ÷ 2 = 15 remainder 1
- 515 ÷ 2 = 7 remainder 1
- 67 ÷ 2 = 3 remainder 1
- 73 ÷ 2 = 1 remainder 1
- 81 ÷ 2 = 0 remainder 1
- 9Read remainders bottom to top: 11111111
Result:
255 in decimal = 11111111 in binary
Hexadecimal FF to Decimal
Problem:
Convert the hexadecimal number FF to decimal.
Solution Steps:
- 1F in hex = 15 in decimal
- 2Position 0 (rightmost): 15 × 16⁰ = 15 × 1 = 15
- 3Position 1: 15 × 16¹ = 15 × 16 = 240
- 4Sum: 240 + 15 = 255
Result:
FF in hexadecimal = 255 in decimal
Decimal 100 to Base 36
Problem:
Convert the decimal number 100 to base 36.
Solution Steps:
- 1100 ÷ 36 = 2 remainder 28
- 22 ÷ 36 = 0 remainder 2
- 328 in base 36 is represented by the letter S (A=10, B=11, ... S=28)
- 4Read remainders bottom to top: 2S
Result:
100 in decimal = 2S in base 36
Tips & Best Practices
- ✓Hexadecimal (base 16) is great for memory addresses: 0xFF = 255 = 11111111 in binary
- ✓Use octal (base 8) for Unix file permissions: 755 = rwxr-xr-x
- ✓Base 36 is the most compact case-insensitive alphanumeric system
- ✓When debugging, try viewing hex values to spot patterns in binary data
- ✓Each hex digit maps to exactly 4 binary digits — memorize the first 16 for quick conversion
- ✓The calculator validates input and rejects digits that don't belong in the selected base
Frequently Asked Questions
Sources & References
Last updated: 2026-06-06
Help us improve!
How would you rate the Base Converter?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: NIST Guide to SI Units
by National Institute of Standards