Number Base Converter
Binary, octal, decimal, hex or any base — converted instantly, with every step explained.
At a glance
- Converts between binary, octal, decimal and hexadecimal at once, plus any base from 2 to 36.
- Exact for whole numbers of any size — hundreds of digits — and for fractions, where repeating digits are shown in brackets: 0.1 in binary is 0.0(0011).
- Shows the working the way it’s taught: place values to convert to decimal, repeated division (remainders read bottom-up) and repeated multiplication for fractions.
- Shows integers in two’s complement for 8, 16, 32 and 64 bits, and reads a binary pattern back as a signed number.
- Breaks a number into the IEEE 754 sign, exponent and mantissa for 32-bit floats and 64-bit doubles, and shows the value actually stored.
- Accepts 0b, 0o and 0x prefixes, spaces and underscores, and groups digits for easy reading.
Step by step
How to convert between number bases
- 1
Type the number
Enter it in any base — 0x or 0b prefixes, spaces and underscores are fine.
- 2
Choose its base
Binary, octal, decimal, hexadecimal or another base from 2 to 36.
- 3
Read every base
The number appears in all the common bases at once; copy any of them.
- 4
Follow the steps
Pick a target base to see the division or multiplication working.
Features
Everything you need, nothing you don’t
All bases at once
Binary, octal, decimal, hex and base 2–36.
Step by step
Division, multiplication and place values.
Fractions
Exact, with repeating digits found.
Any size
Big integers, no rounding.
Two’s complement
8, 16, 32 and 64 bits.
IEEE 754
Float and double bits.
How to convert decimal to binary
Divide the number by 2 again and again, writing down each remainder, until the quotient is 0. The remainders read from the bottom up are the binary number. For 13: 13 ÷ 2 = 6 r 1, 6 ÷ 2 = 3 r 0, 3 ÷ 2 = 1 r 1, 1 ÷ 2 = 0 r 1 — so 13 is 1101. To go back, multiply each digit by its place value and add: 1×8 + 1×4 + 0×2 + 1×1 = 13. The same method works for any base: divide by 8 for octal, by 16 for hex.
Common values
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 1 0000 | 20 | 10 |
| 100 | 110 0100 | 144 | 64 |
| 255 | 1111 1111 | 377 | FF |
| 1024 | 100 0000 0000 | 2000 | 400 |
FAQ
Frequently asked questions
How do I convert binary to decimal?
How do I convert hex to decimal?
Why does 0.1 never end in binary?
What is two’s complement?
What bases are supported?
Is there a size limit?
Keep going
Related tools
Binary to Text Converter
Translate binary code to text and text to binary, live. Handles spaced or joined 8-bit bytes, UTF-8 Hindi and emoji, and flags bad digits. Free and private.
Hex to ASCII Converter
Convert hex to ASCII or UTF-8 text and text to hex as you type. Reads 0x, \x and spaced hex, flags bad bytes and shows a hex dump. Free, private, no upload.
Scientific Calculator
Free online scientific calculator: trig in degrees or radians, logs, powers, roots, factorial, nCr and nPr, fractions, memory and history. Works on phones.
Unit Converter
Convert length, weight, area, volume, temperature, speed, data and 8 more quantities — including guntha, bigha, tola and lakh. Type “5 ft 10 in to cm”.
Number to Words
Convert any number or amount to words: rupees in lakh and crore for cheques and invoices, million and billion, Hindi words and ordinals. Free, instant.
IP Subnet Calculator
Free IP subnet calculator for IPv4 and IPv6: network, broadcast, host range, mask and wildcard from any CIDR, plus subnetting, VLSM and route summarisation.
Last updated Report a problem or suggest a feature