Networking Fundamentals

IP Address to Binary Converter — Free Online Tool

G Gurpreet Singh July 28, 2026 3 min read
The address 192.168.1.1 converted into four binary octets with hexadecimal and 32-bit decimal values
1 Enter an IPv4 address


Converts as you type

Quick fill:




Conversion
Binary (base 2)
Hexadecimal (base 16)
Decimal (32-bit integer)
Octet breakdown

How to Convert an IP Address to Binary by Hand

You will not have this tool in the exam room, so learn the manual method. Each octet is 8 bits, and each bit position has a fixed value:

Bit position12345678
Value1286432168421

Work left to right. If the number is greater than or equal to the position value, write a 1 and subtract; otherwise write a 0 and move on.

Converting 168:

  • 168 ≥ 128 → write 1, remainder 40
  • 40 < 64 → write 0
  • 40 ≥ 32 → write 1, remainder 8
  • 8 < 16 → write 0
  • 8 ≥ 8 → write 1, remainder 0
  • 0 < 4, 0 < 2, 0 < 1 → write 0 0 0

Result: 10101000. Repeat for each octet and 192.168.1.1 becomes 11000000.10101000.00000001.00000001.

Binary Conversion Reference Table

DecimalBinaryHexCommon Use
00000000000Host portion, all bits off
12810000000801 subnet bit (/25 in the last octet)
19211000000C02 subnet bits (/26)
22411100000E03 subnet bits (/27)
24011110000F04 subnet bits (/28)
24811111000F85 subnet bits (/29)
25211111100FC6 subnet bits (/30)
25411111110FE7 subnet bits (/31)
25511111111FFFull octet, all bits on

These nine values are the only ones that can legally appear in a subnet mask. If you see any other number in a mask, the mask is invalid, the 1 bits must be contiguous from the left.

Why Binary Matters: the AND Operation

Routers do not “look up” a network address, they calculate it with a bitwise AND between the IP address and the subnet mask. A bit in the result is 1 only when both input bits are 1.

Take 192.168.1.130 with a /26 mask (255.255.255.192). Only the last octet is interesting:

Last octet (decimal)Last octet (binary)
IP address13010000010
Subnet mask19211000000
AND result12810000000

So the network address is 192.168.1.128/26. Once you can do this in binary, subnetting stops being memorisation and becomes arithmetic. Check your answer with our subnet calculator.

Understanding Hexadecimal

Hex is base 16, so each hex digit represents exactly 4 bits and a full octet is exactly two hex digits. That one-to-one mapping is why MAC addresses, IPv6 addresses and packet captures are all written in hex, it is far more compact than binary and lines up neatly on byte boundaries.

For example 192 = 11000000 = C0, because 1100 is 12 (C) and 0000 is 0.

Frequently Asked Questions

How do I convert 192.168.1.1 to binary?

192 = 11000000, 168 = 10101000, 1 = 00000001, 1 = 00000001. So 192.168.1.1 in binary is 11000000.10101000.00000001.00000001.

What is the binary of 255.255.255.0?

11111111.11111111.11111111.00000000, the subnet mask for a /24 network. The 24 leading 1 bits are exactly where the /24 comes from.

Why is binary important in networking?

Every forwarding decision a router makes is a binary AND between a destination address and a mask. Subnet masks, wildcard masks, route summarisation and access control lists all operate on bits. See NAT and subnet masks for where this shows up in practice.

What is the 32-bit decimal value shown by this tool?

It is the entire address treated as one 32-bit number rather than four separate octets. 192.168.1.1 becomes 3,232,235,777. Databases, firewall rules and route tables often store addresses this way because comparing two integers is far faster than comparing four octets.

Can an octet be greater than 255?

No. Each octet is 8 bits, so the maximum value is 11111111 in binary, which is 255. An address like 192.300.1.1 is invalid and this converter rejects it rather than silently wrapping the value.

How do I convert binary back to decimal?

Add up the position values wherever there is a 1. For 10101000: 128 + 32 + 8 = 168. That is the entire method.

Related Tools and Guides

Practise further with our subnet calculator and VLAN calculator, or read how to convert IP addresses decimal to binary step by step, what an IPv4 address is, and how to find your subnet mask. See all our free networking tools.

GU
Written by

Gurpreet Singh

Hey! I"m Gurpreet Singh and I Have 7+ Years of experience in the Network & Security Domain as well as the Cloud Infra Domain. I am Certified with Cisco ( CCNA ), CheckPoint ( CCSA ), 1xAWS, 3xAZURE, and 3xNSE. So I love to share my tech knowledge with you.

Leave a Reply

Your email address will not be published. Required fields are marked *