Binary, Decimal, Hex & Octal Converter
Convert whole numbers between base 2 (binary), base 8 (octal), base 10 (decimal) and base 16 (hexadecimal) — all four are shown at once.
Updated
Formula
Decimal → base b: divide by b repeatedly, read remainders bottom-up
Base b → decimal: Σ digit × b^position
Example: 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11. Hex digits A–F stand for 10–15.
Examples
255 in decimal
255 (base 10) = 255 decimal = 11111111 binary = FF hex
Binary 101101
101101 (base 2) = 45 decimal = 101101 binary = 2D hex
Hex FF
FF (base 16) = 255 decimal = 11111111 binary = FF hex
Important information
- Prefixes like 0b (binary), 0o (octal) and 0x (hex) are accepted and ignored. Spaces and underscores between digits are fine too.
Frequently asked questions
How do I convert decimal to binary?
Divide by 2 repeatedly and write the remainders in reverse order. 13 → 1101.
What is hexadecimal used for?
Colour codes (#FF5733), memory addresses and compact representations of binary data — each hex digit equals 4 bits.
Can it convert fractions?
No, whole numbers only.
Related calculators
Roman Numeral Converter
Math & Statistics
Numbers to Roman numerals and back.
Open calculatorData Storage Converter
Converters & Everyday
Bytes, KB, MB, GB, TB and GiB.
Open calculatorExponent Calculator
Math & Statistics
Raise a number to any power.
Open calculatorLog Calculator
Math & Statistics
log₁₀, ln, log₂ and custom bases.
Open calculatorScientific Calculator
Math & Statistics
Trig, logs, powers, roots and more.
Open calculatorLCM & GCF (HCF) Calculator
Math & Statistics
Least common multiple and highest common factor.
Open calculator