Number Base Converter
Convert numbers between binary, octal, decimal and hexadecimal. Type a value in any one field and the others update instantly, with validation so you never get a wrong answer from a typo. A free number base converter for developers, in your browser.
- Exact, standard factors
- 100% free
- No sign-up, no app
- Instant as you type
- Works offline after first load
Whole numbers only. Very large values are limited to what a browser can represent exactly.
How to use it
- 1
Pick a field
Type your number into the binary, octal, decimal or hexadecimal box.
- 2
See the rest
The other three bases update instantly. Invalid digits for a base are caught and flagged.
- 3
Copy a value
Copy any base with one click, ready to paste into code or a calculator.
When it comes in handy
Programming
Convert a hex colour or a binary flag to decimal, or work out a bitmask across bases.
Networking
Switch IP and subnet values between binary and decimal to understand masks.
Learning
See how the same number looks in each base, which makes the idea of base much clearer.
Instant, exact & 100% in your browser
The conversion runs right here in your browser using exact, standard factors. Nothing you type is sent to a server, there is no sign-up and no limit, and once the page has loaded it keeps working even with no connection.
Frequently asked questions
- How do I convert binary to decimal?
- Each binary digit represents a power of two, doubling from right to left: 1, 2, 4, 8 and so on. Add the values where there is a 1. So 1010 is 8 + 0 + 2 + 0 = 10. The converter does this instantly and also goes the other way, decimal back to binary.
- What is hexadecimal used for?
- Hexadecimal, or base 16, uses the digits 0 to 9 and the letters A to F. It is popular in programming because each hex digit maps exactly to four binary digits, so it is a compact, readable way to write binary values like colours (e.g. #FF8800), memory addresses and byte data.
- Why does it reject some input?
- Each base only allows certain digits: binary uses 0 and 1, octal 0 to 7, decimal 0 to 9, and hex 0 to 9 plus A to F. If you type a digit that does not belong to the base, the converter flags it rather than guessing, so you never copy a wrong value.