Binary/Decimal/Hex/Octal Converter
Convert numbers between binary, decimal, hexadecimal, and octal instantly. Type in any field to see all conversions update in real time.
Step-by-Step Conversion
How It Works
Every positional number system represents values using digits multiplied by powers of the base. In base b, the rightmost digit is multiplied by b0 = 1, the next by b1, then b2, and so on.
Binary (Base 2) uses only 0 and 1. It is the native language of computers — every bit in memory is a binary digit. For example, 10112 = 1×8 + 0×4 + 1×2 + 1×1 = 1110.
Octal (Base 8) groups every 3 binary digits into one octal digit. Commonly used in Unix file permissions (e.g. 755 = rwxr-xr-x).
Hexadecimal (Base 16) groups every 4 binary digits into one hex digit. Widely used in programming for memory addresses, color codes (#FF0000), and byte values.
To convert between bases: the tool first converts the input to decimal (by summing digit × baseposition), then converts from decimal to each target base (by repeated division, reading remainders in reverse).
Quick Reference
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 127 | 1111111 | 177 | 7F |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 65535 | 1111111111111111 | 177777 | FFFF |
Common Use Cases
Programming
- HTML/CSS color codes (hex: #FF5733)
- Memory addresses and pointers (0x7FFF)
- Bitwise operations and flags
- Byte-level data inspection
Systems
- Unix file permissions (octal: 0o755)
- Network subnet masks (binary)
- ASCII/Unicode character codes
- Register values and debugging
Related Utils
Feedback
Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.
Sending...
Feedback sent. Thank you!
Error occurred!
-
-
-
-
-
-
-
- ABI Encoder / Decoder
- Block Estimator
- Calldata Cost
- CREATE2 Address
- ENS Availability
- ENS Cost Estimator
- ENS Lookup
- ENS Namehash
- ENS Record Viewer
- ENS Subname Explorer
- ERC-20 Unit Converter
- Gas Estimator
- HD Wallet Derivation
- Merkle Tree Visualizer
- 4-Byte Selector Lookup
- Solidity Storage Layout
- Transaction Decoder
- Vanity Address Estimator
- Wallet Address Validator
- Wei/Gwei/Ether Converter
-
-
-
-
-
- API Response
- ASCII Table
- Code Bug Detector
- Code Explanation
- CSS Beautifier
- Env Parser
- GraphQL Query
- Syntax Highlight
- HTML Beautifier
- JS Beautifier
- JSON Formatter
- JSONPath
- JWT Decoder
- JS keyCodes
- API Lorem Ipsum
- RegExp
- Regex Library
- Semver Compare
- SQL Beautifier
- TOML Formatter
- Code Unminifier
- XML Beautifier
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Amortization
- Break-Even
- Compound Interest
- Crypto Profit/Loss
- Debt Payoff
- Discount
- Effective Interest
- Emergency Fund
- Inflation Calculator
- Simple Interest
- Invoice Calculator
- IRR Calculator
- Mortgage
- NPV Calculator
- Portfolio
- Profit Margin
- Rent vs Buy
- Retirement Calc
- ROI Calculator
- Salary vs Hourly
- Savings Goal
- Tax Calculator
- VAT
-
-
-
-
-
-
-
-
-
-
-
-
- Equation Solver
- Exponent Calculator
- Factorial Calculator
- Fibonacci Sequence
- Fraction Calculator
- Fraction Simplifier
- GCD Calculator
- GCD/LCM
- Least Common Multiple (LCM) Calculator
- Logarithm Calculator
- Magic Square
- Matrix Calculator
- Number Base Converter
- Pascal's Triangle
- PDE Solver
- Prime Checker
- Prime Factorization
- Roman Numbers
- Scientific Notation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Broken Link Checker
- Canonical URL Checker
- Core Web Vitals Checker
- Favicon
- Heading Structure
- Keyword Density
- Meta Tags
- Mobile-Friendly Test
- Open Graph Tags
- Page Load Time Analyzer
- Redirect Checker
- robots.txt
- Schema Markup
- SEO Optimized Checklist
- XML Sitemap
- Time on Page Tracker
- Page Title & Desc.
- Twitter Card Generator
-
-
-
-
-
-
- Acceleration
- Substance Amount
- Angle
- Area
- Astronomical
- Base Converter
- Capacitance
- Electric Charge
- Data Transfer
- Data Storage
- Density
- Energy Converter
- Force Converter
- Frequency Converter
- Fuel Economy
- Illuminance
- Inductance
- Length / Distance
- Power
- Pressure
- Electrical Resistance
- Time
- Speed
- Temperature
- Viscosity
- Volume
- Weight
-
-
-
-
-