Convert to and from Bin, Oct, Dec, Hex & other numeral systems - Free Online Tool

Convert numbers between different numeral systems: Binary, Ternary, Quaternary, Octal, Decimal, Duodecimal, Hexadecimal, Vigesimal, and Base 36. Supports auto-detection of 0x and 0b prefixes.

Convert to and from Bin, Oct, Dec, Hex & other numeral systems

This script converts numbers from decimal system (base/radix 10) to other positional systems and vice versa:

  • Binary (base 2, bin, bit)
  • Ternary (base 3, trit)
  • Quaternary (base 4)
  • Octal (base 8, oct)
  • Duodecimal (base 12)
  • Hexadecimal (base 16, hex, nibble)
  • Vigesimal (base 20, where I=18)
  • Base 36

This tool will autodetect C/Java hex numbers starting with '0x' and binary numbers starting with '0b'.

The script can only convert positive integers (whole numbers).

Conversion results:

SystemResult
Binary (2)1100100
Ternary (3)10201
Quaternary (4)1210
Octal (8)144
Decimal (10)100
Duodecimal (12)84
Hex (16)64
Vigesimal (20)50
Base 36 (36)2S

What is Number Base Conversion?

Number base conversion allows you to represent the same number in different numeral systems. Each system uses a different radix (base) and set of digits to represent values. This tool supports bases from 2 to 36, making it useful for computer science education, programming, digital electronics, and mathematical research. Understanding number base conversion is fundamental to computer science and essential for working with binary, hexadecimal, and other numeral systems.

Supported numeral systems:

  • Binary (Base 2): Uses only 0 and 1, fundamental to computer systems
  • Ternary (Base 3): Uses digits 0-2, sometimes used in balanced ternary systems
  • Quaternary (Base 4): Uses digits 0-3
  • Octal (Base 8): Uses digits 0-7, sometimes used in computing
  • Decimal (Base 10): Standard numbering system using digits 0-9
  • Duodecimal (Base 12): Uses digits 0-9 and A-B, historically used in some cultures
  • Hexadecimal (Base 16): Uses digits 0-9 and A-F, common in programming
  • Vigesimal (Base 20): Uses digits 0-9 and A-J, used in some numeral systems
  • Base 36: Uses digits 0-9 and A-Z, maximum base for alphanumeric representation

Use cases: Programming, computer science education, bit manipulation, memory addresses, color codes, encoding systems, mathematical research, and converting numbers between different numeral systems for various applications. This tool is particularly useful for students, developers, and anyone working with different number bases.

Frequently Asked Questions

What is number base conversion?

Number base conversion allows you to represent the same number in different numeral systems. Each system uses a different radix (base) and set of digits to represent values. For example, the decimal number 10 can be represented as 1010 in binary (base 2) or A in hexadecimal (base 16).

What bases are supported?

This tool supports bases from 2 to 36, including binary (2), octal (8), decimal (10), hexadecimal (16), and many others. Base 36 is the maximum as it uses digits 0-9 and letters A-Z.

How do I convert a number to a different base?

Enter your number in the input field, select the source base (the base of your input number), select the target base (the base you want to convert to), and click convert. The tool will automatically convert the number and display the result.

Related Guides