Programmers, students and electronics hobbyists switch between number systems all the time: binary for bits and flags, hex for memory and colours, octal for Unix permissions, decimal for everything else. This converter shows them all at once and stays exact even for numbers far larger than a calculator can hold.
Typical uses
- Programming: inspect bit masks, flags and hex constants.
- Networking: convert IP and MAC address parts between hex and decimal.
- Computer science courses: check base-conversion homework.
- Electronics: read register values from datasheets.
For text instead of numbers, use the Text to Binary or Text to Hex converters.
How to use the Number Base Converter
- Type the number. Prefixes like 0x, 0b and 0o, spaces and underscores are accepted.
- Choose the base it’s written in, or pick Other base for anything from 2 to 36.
- Read the value in decimal, binary, octal, hexadecimal and base 36.
- For negative numbers, the two’s complement form for the smallest fitting width is shown too.
Features
- Arbitrary precision with BigInt: 64-bit and larger values convert exactly.
- Any base from 2 to 36, using digits 0–9 then letters A–Z.
- Optional grouping of binary and hex digits in fours for readability.
- Two’s complement for 8, 16, 32 or 64-bit negative numbers.
- Clear errors that name the invalid digit.
Frequently asked questions
How do I convert binary to decimal?
Each binary digit is worth twice the one to its right. 1011 is 1×8 + 0×4 + 1×2 + 1×1 = 11. Type 1011, choose Binary, and the decimal value appears.
Why is hexadecimal used so much in computing?
One hex digit represents exactly four binary digits, so a byte is always two hex digits. That makes memory addresses, colour codes like #FF8800 and byte values compact and easy to read.
What is two’s complement?
It’s how computers store negative integers. To get −1 in 8 bits, invert the bits of 1 (00000001 → 11111110) and add one, giving 11111111. The converter shows this automatically for negative inputs.
Can it convert fractions like 0.1?
No — it converts whole numbers only. Fractions often don’t have an exact binary form; 0.1 in binary repeats forever.
Written by Dewan Razib