Number Base Converter
Convert numbers between binary, octal, decimal and hexadecimal.
How to Use the Number Base Converter
This tool converts numbers between four common numeral systems used in computing and mathematics:
- Select the input base — choose Binary (2), Octal (8), Decimal (10) or Hexadecimal (16) to match the number you want to convert.
- Type your number — enter a valid number for the selected base. The input field only accepts digits that are valid for that base.
- Read the results — all four base representations are displayed simultaneously and update in real time as you type.
- Copy any result — click the Copy button next to any output row to copy that value to your clipboard.
All conversions happen instantly in your browser. No data is sent to any server.
Frequently Asked Questions
What is a number base?
A number base (or radix) defines how many unique digits are used to represent numbers. Decimal uses 10 digits (0-9), binary uses 2 (0-1), octal uses 8 (0-7) and hexadecimal uses 16 (0-9 plus A-F).
How do I convert binary to decimal?
Each binary digit represents a power of 2. Starting from the right, multiply each digit by 2 raised to its position. For example, binary 1101 = 1×8 + 1×4 + 0×2 + 1×1 = 13 in decimal.
Why is hexadecimal used in programming?
Hexadecimal is compact — each hex digit represents exactly 4 binary bits. This makes it easy to express large binary values in a shorter, more readable form. It is widely used for memory addresses, colour codes and byte values.
What digits are valid in each base?
Binary: 0-1. Octal: 0-7. Decimal: 0-9. Hexadecimal: 0-9 and A-F (case-insensitive). Entering an invalid digit for the selected base will show a validation error.
Is there a maximum number I can convert?
This tool uses JavaScript's native parseInt and toString, which handle integers accurately up to 2^53 - 1 (9,007,199,254,740,991 in decimal). For most practical purposes this is more than enough.
More Math & Calculators
Percentage Calculator
Calculate percentages: X% of Y, percentage increase/decrease, and more.
Open tool →Age Calculator
Calculate exact age in years, months and days from a birthdate.
Open tool →BMI Calculator
Calculate your Body Mass Index and find your weight category.
Open tool →Tip Calculator
Calculate tip amount and split the bill between friends.
Open tool →Discount Calculator
Calculate discount amount, final price and savings instantly.
Open tool →Loan / Mortgage Calculator
Calculate monthly payments, total interest and amortization for any loan.
Open tool →