Base Converter

Convert a whole number between any two numeric bases — binary, octal, decimal, hexadecimal, or a custom base from 2 to 36. For example, decimal 42₁₀ = binary 101010₂ = octal 52₈ = hex 2A₁₆.

Convert a Number

Choose the base your number is written in and the base you want it converted to.

Whole numbers only. No spaces, symbols, decimal points, or prefixes such as 0x.

Try an example:

What Is a Number Base?

A number base (or radix) determines how many unique digits are available and what each position in a number is worth. Binary is base 2 (digits 0-1), octal is base 8 (digits 0-7), decimal is base 10 (digits 0-9), and hexadecimal is base 16 (digits 0-9 and A-F). For example, decimal 42 equals binary 101010, octal 52, and hex 2A — the same value, written with a different set of digits and place values.

Quick Reference Table

DecimalBinaryOctalHex
0000
1111
21022
711177
81000108
10101012A
15111117F
16100002010
3111111371F
42101010522A
25511111111377FF

Explore a Specific Conversion

This converter handles any base pair at a glance. For the full positional-notation math, grouping method, and worked examples behind one specific conversion, use a dedicated page:

For binary, hex, and octal hubs with additional text-encoding tools, see the Binary Converter, Hex Converter, and Octal Converter. For signed binary values, use the Two's Complement Calculator.

Frequently Asked Questions

Does this converter support custom bases like 3, 12, or 36?

Yes. Choose "Custom base" for either side and enter any whole-number base from 2 to 36. Digits above 9 use letters A-Z, so base 36 can use every digit and letter.

Can this converter handle numbers larger than Number.MAX_SAFE_INTEGER?

Yes. Every conversion is done with BigInt digit-by-digit parsing and BigInt division, never through JavaScript Number, so precision is exact for integers of any size.

Does it support negative numbers or fractions?

No — this is a whole, unsigned number converter. A minus sign is rejected because signed values need a fixed bit width and a format such as two's complement; use the Two's Complement Calculator for that. Fractional input like 10.5 is also rejected rather than truncated.

Why do dedicated pages like Hex to Decimal or Binary to Octal exist too?

This converter is a fast, general-purpose hub for any base pair. The dedicated converters focus on one specific conversion and show the full positional-notation or grouping method behind the result — use those when you want the worked math.