IPv4 to Binary Converter
Enter an IPv4 address and pick a direction to convert between dotted decimal and binary.
Result
How it is calculated
An IPv4 address is four numbers (octets) separated by dots. In address-to-binary mode each octet, 0 to 255, is written in base 2 and padded with leading zeros to exactly eight digits, then the four groups are joined with dots. In binary-to-address mode each group of up to eight 0s and 1s is read as a base-2 number, b7·128 + b6·64 + b5·32 + b4·16 + b3·8 + b2·4 + b1·2 + b0, and printed in decimal.
In both directions the tool also reports the 32-bit integer value a·2²⁴ + b·2¹⁶ + c·2⁸ + d. The input must have exactly four dot-separated parts. Decimal octets must be digits only and not above 255; binary groups may only contain 0 and 1, and a group shorter than eight digits is accepted and read as a number (so 1010 means 10). Anything else returns no result. Only IPv4 is covered, not IPv6.
Worked example
Convert 192.168.1.10 in address-to-binary mode. 192 = 128 + 64, so 11000000. 168 = 128 + 32 + 8, so 10101000. 1 becomes 00000001 after padding to eight digits, and 10 = 8 + 2 becomes 00001010. The tool shows 11000000.10101000.00000001.00001010, and the 32-bit integer 3,232,235,786 beneath it. Switching to binary-to-address mode and entering that binary string returns 192.168.1.10.
Common mistakes
- Leaving the direction set to address-to-binary while entering binary digits, or the reverse. A binary string in the wrong mode is rejected, as is a decimal address in binary-to-address mode.
- Writing an octet above 255 (such as 192.168.1.256) or giving only three parts. Both return nothing rather than a corrected address.
- Leaving out the padding zeros when typing binary by hand. A short group such as 1 or 1010 is accepted and read as 1 or 10, so
11000000.10101000.1.1010gives 192.168.1.10 and can hide a typo. Write all eight digits per group. - Entering a binary group with digits other than 0 or 1, for example 11000002. Only 0 and 1 are allowed in that mode.
- Entering a CIDR prefix such as 192.168.1.10/24. The slash part is not accepted; enter the address alone.
Sources
About this calculator
An IPv4 address like 192.168.1.1 is really a 32-bit number, split into four 8-bit octets and written in dotted decimal for humans to read. Each octet ranges from 0 to 255 because that's the full range of an 8-bit binary value (00000000 to 11111111).
Converting between the decimal and binary forms — and seeing the full 32-bit integer — is a routine task for network engineers and students studying subnetting, ACLs, and routing tables, since subnet masks, wildcard masks, and CIDR calculations are all defined in binary underneath the dotted decimal notation everyone actually types. It's a staple exercise in CCNA/CCNP and networking coursework.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The tool accepts any four octets, so you can paste a subnet mask too. 255.255.255.0 becomes 24 ones followed by 8 zeros, and the number of leading ones is the prefix length, /24. The 32-bit value shown for that mask is 4,294,967,040. Would you rather see CIDR notation or IPv6 supported first? Let us know which of the two matters more to you.