Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal. Supports bases 2 through 36.

Enter a valid base-10 number
Decimal (10)
255
Base-10 representation
Binary (2)
1111 1111
8 bits: 8 ones, 0 zeros
Octal (8)
377
0o377 -- 3 octal digits
Hexadecimal (16)
FF
0xFF -- 2 hex digits
Base 16
FF
Converted to base 16
Base 36
73
Compact alphanumeric encoding (0-9, A-Z)
Byte Count
1
8 bits = 1 byte(s)
Bit Density
100.0% ones
8 set bits out of 8
Bit Pattern Visualization
11111111
8/8 bits set
Byte Breakdown
11111111
0xFF (255)
Conversion Steps (divide by 16)
StepDividend/ 16QuotientRemainderDigit
1255/ 161515F
215/ 16015F
Read digits bottom to top: FF
Common Values Reference
DecimalBinaryOctalHexDescription
0000Zero
1111One
711177Max 3-bit
15111117FMax nibble (4-bit)
12711111111777FMax signed byte
25511111111377FFMax unsigned byte
2561000000004001002^8
1,023111111111117773FFMax 10-bit
4,09610000000000001000010002^12
65,5351111111111111111177777FFFFMax 16-bit
16,777,21511111111111111111111111177777777FFFFFFMax 24-bit (RGB)
Batch Converter

Enter multiple base-10 numbers separated by spaces or commas

Up to 20 base-10 values
Planning notes, formulas, and examples

About the Number Base Converter

The Number Base Converter converts integers between any number bases from 2 to 36. Enter a number in one base and see its representation in binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), and any custom base.

Number bases are fundamental in computer science. Binary is the language of computers. Hexadecimal provides a compact way to represent binary data. Octal was historically used in Unix file permissions.

This calculator handles conversions in both directions and supports bases up to 36, where digits beyond 9 use letters A–Z. Enter your value, specify its base, and review the converted forms.

When This Page Helps

Manual base conversion requires repeated division and is error-prone. This calculator converts between all common bases and supports custom bases up to 36.

How to Use the Inputs

  1. Enter a number.
  2. Select or type the base of the input number (2–36).
  3. View conversions to binary, octal, decimal, and hex.
  4. Enter a custom output base for any other system.
  5. Use for programming, networking, or digital electronics.
Formula used
To convert base b to decimal: d = Σ(digitᵢ × b^i) for i = 0, 1, ... To convert decimal to base b: Repeatedly divide by b and collect remainders.

Example Calculation

Result: Binary: 11111111, Hex: FF

255 in binary: 255 / 2 repeatedly gives 11111111. In hex: 255 / 16 = 15 remainder 15, so FF.

Tips & Best Practices

  • Hex digits: 0–9, A=10, B=11, C=12, D=13, E=14, F=15.
  • Each hex digit represents exactly 4 binary digits (bits).
  • Each octal digit represents exactly 3 bits.
  • Prefix conventions: 0b (binary), 0o (octal), 0x (hex).
  • Base 36 uses all digits 0–9 and letters A–Z.
  • IP addresses, MAC addresses, and colors (#RRGGBB) use hexadecimal.

Binary in Digital Electronics

Every digital circuit operates in binary. Logic gates (AND, OR, NOT) process single bits. Complex processors chain billions of these gates to perform calculations.

Hexadecimal in Web Development

CSS colors use hex: #FF8800 means Red=255, Green=136, Blue=0. Each pair of hex digits represents one byte (0–255).

Octal in Unix

Unix file permissions use octal: 755 means rwxr-xr-x. Each digit represents 3 permission bits (read, write, execute) for owner, group, and others.

A solid grasp of number bases is fundamental for anyone working with low-level programming or network protocols.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • A number base (radix) is the number of unique digits used in a positional numeral system. Decimal uses 10 digits (0–9), binary uses 2 (0–1), hex uses 16 (0–F).