IP Converter

🔢 IP Address Converter

Convert any IPv4 address to Binary, Hexadecimal, Octal and Decimal. Identify class, type and subnet.

What is IP Address Converter?

IP addresses are 32-bit numbers normally written in dotted decimal notation (e.g. 192.168.1.1). Internally computers and network protocols work with binary representations. Converting between decimal, binary, hexadecimal, and octal formats is essential for subnetting, CIDR calculations, firewall rule writing, and packet analysis.

This tool converts any valid IPv4 address between all four formats, identifies the IP class (A through E), determines whether the address is public or private, shows the default classful subnet mask, and generates the reverse DNS PTR record name used in PTR lookups. All computation happens instantly in the browser with no server round-trip.

How to Use It?

Enter any IPv4 address in dotted decimal format (e.g. 10.0.0.1 or 203.0.113.5) and click Convert →. All formats and analysis appear immediately. Each value can be selected and copied.

💡 Real-World Example

Example: A networking student needs to understand why 192.168.1.0/24 covers 256 addresses. Entering 192.168.1.0 into IP Converter shows the binary form 11000000.10101000.00000001.00000000 — visually demonstrating that the last octet (8 bits) is fully available for host addresses, which is exactly 2&sup8; = 256.

🔢 Binary Basics for Networking

Computers store IP addresses as 32-bit binary numbers — everything else (dotted decimal, hex) is just a human-friendly way to display the same underlying bits.

Bit
A single 0 or 1 — the smallest unit of binary data. An IPv4 address is exactly 32 bits.
Octet
A group of 8 bits, representing values 0–255. An IPv4 address has 4 octets, separated by dots (e.g. 192.168.1.1).
Place value
Each bit position represents a power of 2: 128, 64, 32, 16, 8, 4, 2, 1 (left to right). An octet's decimal value is the SUM of the place values where the bit is 1.
Why binary matters for networking
Subnet masks and CIDR prefixes work by drawing a line through these 32 bits — bits to the LEFT of the line identify the NETWORK, bits to the RIGHT identify the HOST. The Binary ↔ IPv4 converter above lets you SEE exactly where that line falls.
💡 Worked Example

The octet 192 in binary is 11000000. Reading left to right: 128+64+0+0+0+0+0+0 = 192. ✓

🌐 CIDR Explained

CIDR (Classless Inter-Domain Routing) notation — the "/24" in 192.168.1.0/24 — replaced the old rigid Class A/B/C system, allowing networks of ANY size by specifying exactly how many bits (from the left) belong to the network portion.

CIDR PrefixSubnet MaskTotal AddressesUsable HostsTypical Use
/8255.0.0.016,777,21616,777,214Entire Class A network (historical)
/16255.255.0.065,53665,534Large enterprise network
/24255.255.255.0256254Typical office/home LAN
/28255.255.255.2401614Small department, point-to-multipoint links
/30255.255.255.25242Point-to-point link (router-to-router)
/32255.255.255.25511 (the host itself)Single host route

Key insight: Every increase of 1 in the prefix number HALVES the number of available addresses (and doubles the number of possible subnets at that size). The "Usable Hosts" is always 2 less than "Total Addresses" because the FIRST address is reserved as the Network Address and the LAST is reserved as the Broadcast Address (except for /31 and /32, which have special rules used for point-to-point links and single-host routes).

📊 Subnet Examples — Splitting a Network

The Subnet Calculator above takes ONE network and splits it into multiple EQUAL-sized smaller networks — a common task when allocating address space to different departments, VLANs, or sites.

💡 Example: Office with 4 Departments

A company has 192.168.1.0/24 (256 addresses) and needs to give each of 4 departments (Sales, IT, HR, Finance) its own isolated subnet. Entering 192.168.1.0/24 with "4 subnets" produces four /26 networks, each with 62 usable hosts:

192.168.1.0/26 (Sales) · 192.168.1.64/26 (IT) · 192.168.1.128/26 (HR) · 192.168.1.192/26 (Finance)

💡 Example: Point-to-Point Router Links

A company connects 8 branch offices to HQ via dedicated links. Each link only needs 2 usable IPs (one per end). Splitting 10.0.0.0/24 into 8 subnets yields eight /27 networks (30 usable hosts each) — oversized for a 2-host link. For maximum efficiency, a /30 (2 usable hosts) would be used for EACH link instead — achievable by entering 10.0.0.0/24 with "64 subnets" to get /30-sized blocks.

Note on "subnets created" vs "requested": Because subnetting must split networks into POWERS OF 2 (2, 4, 8, 16...), if you request a number that isn't a power of 2 (e.g. 5), the calculator creates the NEXT power of 2 (8) — this is shown clearly in the "Subnets Created" field.

📊 Understanding Your Results

Decimal (Integer)
The single 32-bit number representation, used internally by databases and some programming APIs (e.g. MySQL's INET_ATON function).
Binary (dotted)
Each octet shown as 8 bits. This is the form to look at when understanding subnet masks — the number of leading 1-bits in a mask defines the network portion.
IP Class
A legacy classification (A/B/C/D/E) based on the first octet's range. Modern networking uses CIDR notation instead, but the class still indicates the historical default subnet size.
Reverse DNS PTR
The special in-addr.arpa domain name format used when a server needs to look up which hostname an IP resolves back to — commonly checked by mail servers as an anti-spam measure.

⚠️ Common Errors & What They Mean

❌ "Invalid IPv4 address"
Each octet must be 0–255. A value like 192.168.1.300 is invalid because 300 exceeds the 8-bit (0–255) limit per octet.
⚠️ IPv6 addresses not supported
This converter is IPv4-only (32-bit). IPv6 (128-bit) uses entirely different conversion math — a dedicated IPv6 tool would be needed for those conversions.
❓ "Is Private: Yes" for an address I thought was public
Ranges like 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are RESERVED for private networks globally — even if your router shows this as "your IP," it's only valid on your local network.

💡 Advanced Tips

🏫
Learning subnetting
Convert both your IP and your subnet mask to binary side-by-side — the bits where the mask has 1s define your network; the remaining bits define usable host addresses.
💻
Database storage
Many databases store IPs as the Decimal integer for faster range queries (e.g. "find all IPs between X and Y") — this tool gives you that exact integer to insert.
🔎
PTR record setup
If you manage a mail server, ask your hosting provider to set the PTR record shown here to match your server's hostname — missing PTR records are a common cause of emails being marked as spam.
Hex for packet analysis
When reading raw packet captures (Wireshark, tcpdump), IPs sometimes appear in hex — use this tool to quickly translate back to dotted decimal.

📜 IP Format Comparison

FormatExample (for 192.168.1.1)Common Use
Dotted Decimal192.168.1.1Everyday human use, configuration files
Decimal Integer3232235777Database storage, range comparisons
Binary11000000.10101000.00000001.00000001Subnetting, CIDR mask calculations
HexadecimalC0.A8.01.01Packet analysis, low-level programming

FAQ

What is the difference between public and private IP? +
Private IPs (10.x.x.x, 172.16-31.x.x, 192.168.x.x) are used inside local networks. Public IPs are globally unique and assigned by ISPs for internet communication.
Why convert IP to binary? +
Binary shows exactly how subnet masks work. Each bit determines whether it belongs to the network portion or host portion. Essential for understanding CIDR notation like /24 or /16.
What is IP Class? +
The original classful system: Class A (1-126.x, 16M hosts), B (128-191.x, 65K hosts), C (192-223.x, 254 hosts), D (multicast), E (reserved). Modern networks use CIDR but classes remain relevant.
What is a reverse DNS PTR record? +
PTR maps an IP back to a domain name. The format shown (reversed octets + .in-addr.arpa) is how the PTR record name appears in DNS. Mail servers use it to verify legitimate sending IPs.
What is 127.0.0.1? +
The loopback address. Traffic sent here never leaves the device. Used for testing network software locally. The entire 127.0.0.0/8 block is reserved for loopback.
✓ Copied!