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.
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
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 31 | 11111 | 37 | 1F |
| 42 | 101010 | 52 | 2A |
| 255 | 11111111 | 377 | FF |
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:
Decimal to Binary
Binary to Decimal
Decimal to Hex
Hex to Decimal
Binary to Hex
Hex to Binary
Binary to Octal
Octal to Binary
Octal to Decimal
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.
Related Tools
You might also find these tools useful
Binary Converter
Convert text, UTF-8 bytes, and binary values without focusing only on readable messages.
Binary Calculator
Add, subtract, multiply, and divide binary numbers for math and computer science exercises.
Binary to Decimal
Turn base-2 numbers into decimal values for programming, networking, and study notes.
Binary to HEX
Compress long binary strings into hexadecimal groups for code, memory, and color checks.
Decimal to Binary
Convert everyday base-10 numbers into binary with clear fixed-width output.
Decimal to HEX
Translate decimal values into compact hexadecimal notation for technical references.