ToolNestr

IP to Binary / Hex / Decimal Converter

Type an IP address in any format — dotted decimal, binary, or hex — and see the equivalent values in all other formats update live. Perfect for learning how IP addressing works at the bit level.

Reviewed by the ToolNestr Editorial Team — July 2026

Convert between formats

Type into any field — the others update live.

Dotted Decimal
Binary (32 bits, dots optional)
Hexadecimal

Understanding IP representations

An IPv4 address is fundamentally a 32-bit unsigned integer. The familiar dotted decimal notation — 192.168.1.1 — is simply a human-friendly representation of this binary number. Each of the four octets represents 8 bits, ranging from 0 to 255. The entire 32-bit value ranges from 0 to 4,294,967,295. Understanding how to convert between these representations is essential for subnetting, network programming, and troubleshooting.

The binary representation is where the real action happens. The first octet's most significant bit (bit 31) tells you the IP class in classful addressing: 0 = Class A, 10 = Class B, 110 = Class C, 1110 = Class D (multicast), 1111 = Class E (reserved). While classful addressing has been superseded by CIDR, knowing how to read the first few bits of an IP address still helps you understand address ranges and allocation patterns at a glance.

Hexadecimal representation is commonly used in network configuration files, MAC addresses, and some firewall rule syntaxes. Each octet converts to exactly two hexadecimal digits because 8 bits = 16^2 = 256 possible values. The hex form is more compact than binary but less intuitive than decimal. Network professionals working with packet captures in Wireshark or tcpdump frequently encounter hex-encoded IP addresses in raw packet data.

IP Address Representation Reference Chart showing the same IP address 192.168.1.1 in decimal, binary, and hexadecimal notations IP Address Representations — 192.168.1.1 Decimal 192.168.1.1 Binary 11000000.10101000.00000001.00000001 Hexadecimal C0.A8.01.01 All three represent the same 32-bit number: 3232235777
The same IPv4 address expressed in dotted decimal, binary, and hexadecimal notations

How to convert between formats manually

Converting between IP representations is a fundamental skill for network engineers. The easiest place to start is converting decimal to binary. For each octet, write down the eight bit positions (128, 64, 32, 16, 8, 4, 2, 1). If the octet value is greater than or equal to the bit position, subtract it and write 1; otherwise write 0. For example, for the octet 192: 192 >= 128 subtract (remainder 64) = 1; 64 >= 64 subtract (remainder 0) = 1; 64 < 32 = 0; 0 < 16 = 0; 0 < 8 = 0; 0 < 4 = 0; 0 < 2 = 0; 0 < 1 = 0. Result: 11000000.

To convert binary to decimal, reverse the process. For each bit position that is 1, add its value. Binary 11000000 = 128 + 64 = 192. Binary 10101000 = 128 + 0 + 32 + 0 + 8 + 0 + 0 + 0 = 168. Binary 00000001 = 1. This addition method works for any binary number and is the foundation of all IP math.

Hexadecimal conversion is the simplest. Group each 8-bit octet into two 4-bit nibbles. The high nibble (bits 7-4) and low nibble (bits 3-0) each convert to a single hex digit (0-9, A-F). For 192: binary 1100 = hex C, binary 0000 = hex 0, so 192 = 0xC0. For 168: binary 1010 = hex A, binary 1000 = hex 8, so 168 = 0xA8. Putting it all together, 192.168.1.1 = C0.A8.01.01 in hex.

Quick conversion reference

Decimal Binary Hex
00000000000
10000000101
10000010100A
1000110010064
1281000000080
19211000000C0
22411100000E0
24011110000F0
24811111000F8
25211111100FC
25411111110FE
25511111111FF

Practical applications

IP conversion skills are essential in several network engineering tasks. Subnetting requires converting between decimal and binary to find network and broadcast addresses. When writing firewall rules, source and destination addresses can be expressed in decimal, binary, or hex depending on the platform. Network automation scripts often need to convert IP addresses between formats for API calls and database storage.

For CompTIA Network+ and Cisco CCNA certification exams, you are expected to convert between decimal and binary quickly. Exam questions often ask for the network address, broadcast address, or valid host range for a given IP and subnet mask, and these calculations require binary conversion. Practicing with this converter builds speed and confidence for these timed exams.

In programming, IP addresses are frequently stored as 32-bit integers for efficient comparison and sorting. Functions like inet_pton() and inet_ntop() convert between presentation format (dotted decimal) and network byte order integers. Understanding the underlying integer representation helps when debugging network code, parsing binary packet captures, or implementing custom networking protocols.

Limitations

This converter handles standard IPv4 dotted decimal notation and its binary and hex equivalents. It does not handle IPv6 addresses, CIDR notation (prefix lengths), or subnet masks. For IPv6 support, use the IPv4 to IPv6 converter tool. For subnet calculations involving CIDR prefixes, use the Subnet Calculator or CIDR Calculator tools. The converter performs validation on input and gracefully handles common formatting variations including missing dots in binary input and case-insensitive hex digits.

Frequently asked questions

Why would I need to convert an IP to binary?

Understanding binary representation is essential for subnetting, route aggregation, and network troubleshooting. Subnet masks, network addresses, and broadcast addresses are all computed using bitwise operations on the binary form of IP addresses. Binary conversion helps you verify these calculations manually.

What does an IP look like in binary?

Each octet of an IPv4 address is 8 bits. For example, 192.168.1.1 in binary is 11000000.10101000.00000001.00000001. The dots separate each 8-bit octet for readability. The full 32-bit binary string is what the network stack actually processes.

How do I convert an IP to hex?

Each octet converts to two hex digits. For example, 192 = 0xC0, 168 = 0xA8, 1 = 0x01, so 192.168.1.1 becomes C0.A8.01.01. The hex form is sometimes used in network configuration files and firewall rules.

What is the decimal value of an IP address?

The decimal value treats the 32-bit IP as a single unsigned integer. For 192.168.1.1: (192 x 256^3) + (168 x 256^2) + (1 x 256) + 1 = 3,232,235,777. This form is used in some programming APIs and databases.

What is the fastest way to convert IP to binary manually?

Memorize the powers of 2 for each bit position (128, 64, 32, 16, 8, 4, 2, 1). For each octet, subtract the largest power of 2 that fits and mark that bit as 1, then continue with the remainder. With practice, you can convert any octet in seconds.

Why are IP addresses written in decimal and not binary?

Dotted decimal notation was chosen because 32-bit binary strings are too long for humans to read and remember. Each octet ranges from 0 to 255, which is easily memorable. The dotted format (RFC 791) balances human readability with machine efficiency.

How do I convert a binary IP back to decimal?

Split the binary string into 4 groups of 8 bits. For each group, multiply each 1-bit by its position value (128, 64, 32, 16, 8, 4, 2, 1) and add the results. For example, 11000000 = 128 + 64 = 192. Then join the four decimal numbers with dots.

What is the maximum IP address in decimal?

The maximum possible IPv4 address is 255.255.255.255, which as a single decimal integer is 4,294,967,295 (FFFF.FFFF.FFFF.FFFF in hex). This address is reserved as the limited broadcast address.

All tool categories

Networking & IP Tools (36 tools)
🧮 Everyday (26 tools)
💪 Health & Fitness (30 tools)
💰 Finance (34 tools)
🔢 Math (23 tools)
📄 PDF Tools (10 tools)
🎨 Creators (12 tools)
💻 Developers (24 tools)
⚡ Engineering & Science (24 tools)
⚛️ Physics (48 tools)
🧪 Chemistry (50 tools)
🧬 Biology (50 tools)
🏠 Construction & Home Improvement (105 tools)
👗 Clothing & Garment Tools (68 tools)
🍳 Cooking & Baking (9 tools)
🚗 Automotive (26 tools)
🖼️ Image Tools (13 tools)
🔐 Security & Hash (15 tools)
📝 Text Tools (15 tools)
🔍 SEO Tools (11 tools)
🔄 Converters (69 tools)
🕐 Time & Date (15 tools)
📊 Chart Generators (11 tools)
🕌 Islamic Tools (16 tools)