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.
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 →Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
Text ↔ Binary ↔ Hex Converter
Convert text to binary, binary to text, text to hexadecimal, and hex to text. Free online converter with separator options. Runs entirely in your browser.
Open free tool →
Color Format Converter
Convert colors between HEX, RGB, and HSL formats instantly. Type any color value and get all other formats in one click. Visual color picker included. Runs entirely in your browser.
Open free tool →
Color Palette Extractor
Parse hex color codes to build a visual palette. View swatches, generate shades, see complementary and triadic harmonies, and export CSS custom properties.
Open free tool →
More Free Tools
Related Articles
Base64 Encode/Decode Explained: When and How to Use It
Understand when to use Base64 encoding and when to avoid it. This guide explains the Base64 algorithm, practical use cases, code examples in JavaScript, Python, Go, and more.
Base64 Encode Decode Online: Complete Developer Guide
Everything developers need to know about Base64 encoding and decoding—how it works, when to use it, URL-safe vs standard, plus a free browser-based Base64 encode decode tool.
Base64 Decode Online: Instantly Decode Any Base64 String for Free
Decode Base64 strings instantly online — JWT payloads, API image data, env vars, and SSH keys. No install needed, no account. URL-safe variant supported.
Base64 Encode Decode Online — Instant Browser-Based Converter
Base64 encode decode online — convert text, JSON, binary, and images to Base64 and back in seconds. No install, no signup, fully private. Learn how Base64 works with practical code examples.
Base64 Encoder Decoder: Complete Guide for Developers
Everything developers need to know about Base64 encoding and decoding. How it works, when to use it, common pitfalls, and a free online Base64 encoder decoder tool.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →