Skip to main content

Binary ↔ Decimal ↔ Hex ↔ Octal Converter

Convert numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — with step-by-step conversion math so you understand exactly how it works. Everything runs in your browser.

✓ Step-by-step breakdown ✓ All 4 bases at once ✓ Runs 100% in your browser

Frequently Asked Questions

How do you convert binary to decimal?▼

Multiply each binary digit by 2 raised to its position power, then sum the results. For example, 1010 = 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 8 + 0 + 2 + 0 = 10. This tool shows every step of the calculation.

What is the difference between binary, octal, decimal, and hexadecimal?▼

They are different number bases: binary (base 2) uses only 0 and 1, octal (base 8) uses 0–7, decimal (base 10) uses 0–9 (our everyday system), and hexadecimal (base 16) uses 0–9 and A–F. Computers work natively in binary; hex is a compact shorthand for binary (4 bits = 1 hex digit).

How do you convert decimal to binary?▼

Repeatedly divide the number by 2 and record each remainder. Read the remainders from bottom to top. For example: 172 ÷ 2 = 86 r0, 86 ÷ 2 = 43 r0, 43 ÷ 2 = 21 r1, 21 ÷ 2 = 10 r1, 10 ÷ 2 = 5 r0, 5 ÷ 2 = 2 r1, 2 ÷ 2 = 1 r0, 1 ÷ 2 = 0 r1 → read up: 10101100.

Why is hex used instead of binary in programming?▼

Binary strings get very long quickly — a 32-bit number needs 32 digits in binary but only 8 in hex. Each hex digit represents exactly 4 binary bits (a nibble), making conversion simple and the representation compact. Memory addresses, color codes (#FF6600), and byte values are all expressed in hex.

What is a nibble and a byte in binary?▼

A nibble is 4 binary bits (one hex digit), representing values 0–15. A byte is 8 binary bits (two hex digits), representing values 0–255. A byte is the fundamental unit of digital data storage.

Looking for more free developer tools?

Browse All Free Tools →
Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →