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

Divide by target base, record remainder, repeat with quotient until zero

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
2Binary0-1Computer logic, bitwise operations
8Octal0-7Unix file permissions, compact binary
10Decimal0-9Everyday counting
16Hexadecimal0-9, A-FColor codes, memory addresses
32Base320-9, A-VTOTP secrets, file naming
36Base360-9, A-ZURL shorteners, compact IDs

How to Use This Calculator

The base converter supports conversion between any two bases from 2 to 36:

  1. 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.
  2. Set the target base: Click a base button or type a value for the destination base.
  3. Enter the number: Type your number in the input field. The calculator validates that all digits are valid for the selected source base.
  4. 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:

  1. 1255 ÷ 2 = 127 remainder 1
  2. 2127 ÷ 2 = 63 remainder 1
  3. 363 ÷ 2 = 31 remainder 1
  4. 431 ÷ 2 = 15 remainder 1
  5. 515 ÷ 2 = 7 remainder 1
  6. 67 ÷ 2 = 3 remainder 1
  7. 73 ÷ 2 = 1 remainder 1
  8. 81 ÷ 2 = 0 remainder 1
  9. 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:

  1. 1F in hex = 15 in decimal
  2. 2Position 0 (rightmost): 15 × 16⁰ = 15 × 1 = 15
  3. 3Position 1: 15 × 16¹ = 15 × 16 = 240
  4. 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:

  1. 1100 ÷ 36 = 2 remainder 28
  2. 22 ÷ 36 = 0 remainder 2
  3. 328 in base 36 is represented by the letter S (A=10, B=11, ... S=28)
  4. 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

Binary (base 2) is the most fundamental base in computing because it directly represents the on/off states of transistors. However, hexadecimal (base 16) is the most commonly used representation in programming and debugging because it provides a compact notation for binary values — each hex digit represents exactly four binary digits.
The choice of base depends on the context. Use decimal for human-readable values, binary for low-level operations and bitwise math, octal for Unix file permissions, hexadecimal for memory addresses and color codes, and base32 or base36 for compact identifiers. Most programming languages provide built-in functions for converting between bases.
Hexadecimal is popular because it maps directly to binary with a factor of 4: each hex digit represents exactly 4 bits. This makes it easy to convert between hex and binary visually, without calculation. For example, the hex digit B (11 in decimal) is 1011 in binary. This compactness makes hex ideal for representing binary data in a human-readable form.
For bases above 10, uppercase letters A through Z are used to represent values 10 through 35. For example, in hexadecimal (base 16), A=10, B=11, C=12, D=13, E=14, F=15. In base 36, the full range extends to Z=35. This calculator uses the standard convention of 0-9 followed by A-Z.
This converter works with non-negative integers. Negative numbers are typically represented using signed magnitude, one's complement, or two's complement notation, which adds additional complexity. For most practical base conversion tasks, working with absolute values and applying the sign afterward is the standard approach.

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.

Source

Formula Source: NIST Guide to SI Units

by National Institute of Standards

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.