taap.digitalnetwork engineering toolkit

IPv4 address converter

Paste an address in any common form: 192.168.1.1, 11000000.10101000.00000001.00000001, 0xC0A80101 or 3232235777. All other representations appear instantly.

ipconv

One number, four notations

An IPv4 address is a single unsigned 32-bit integer. Dotted decimal just splits it into four 8-bit octets for human readability. Every representation below is the same value:

Notation192.168.1.1
Dotted decimal192.168.1.1
Binary11000000.10101000.00000001.00000001
Hexadecimal0xC0A80101
32-bit integer3232235777

The math

integer = o1 × 16,777,216 + o2 × 65,536 + o3 × 256 + o4

For 192.168.1.1: 192 × 16,777,216 = 3,221,225,472; 168 × 65,536 = 11,010,048; 1 × 256 = 256; plus 1. Total 3,232,235,777.

Decimal to binary per octet uses the place values 128, 64, 32, 16, 8, 4, 2, 1. For 168: 128 + 32 + 8 = 168, so the bits are 10101000. Hex is even easier: each octet is exactly two hex digits (168 = 0xA8).

Where you meet these formats

  • Binary: subnetting by hand, understanding masks and wildcards, CCNA exams.
  • Hex: packet captures (Wireshark hex pane), /proc/net/route and /proc/net/tcp on Linux (stored little-endian, so the bytes appear reversed), some vendor debug output, and IPv4-mapped IPv6 addresses.
  • Integer: databases (MySQL INET_ATON()/INET_NTOA(), PostgreSQL arithmetic on inet), geo-IP lookup tables, log analytics where range queries become simple BETWEEN filters.

Quick checks on Linux

# integer → dotted (Python one-liner)
python3 -c "import ipaddress; print(ipaddress.IPv4Address(3232235777))"

# dotted → hex
printf '%02X' 192 168 1 1; echo

# Linux routing table in hex (little-endian)
cat /proc/net/route

Address type detection

The status line also classifies the address: private (RFC 1918: 10/8, 172.16/12, 192.168/16), shared CGNAT space (RFC 6598: 100.64/10), loopback (127/8), link-local (169.254/16, APIPA), multicast (224/4), reserved (240/4) or public. The legacy class (A–E) is shown for reference only.

Watch out for

  • Leading zeros: some parsers (older inet_aton, ping on certain systems) read 010.001.001.001 as octal, i.e. 8.1.1.1. Never pad octets with zeros in configs.
  • Byte order: network byte order is big-endian. If a tool shows 0x0101A8C0, it is the same address stored little-endian.
  • Signed integers: some languages and older databases store addresses as signed 32-bit values, so anything from 128.0.0.0 upward appears negative. 192.168.1.1 becomes −1,062,731,519. Add 232 to recover the unsigned value.

The converter accepts binary with or without dots and hex with a 0x prefix. Integers up to 4,294,967,295 are valid; anything larger is rejected because it does not fit in 32 bits.

Frequently asked questions

What is the largest IPv4 integer?

4,294,967,295 (232 − 1), which is 255.255.255.255.

Can I ping an IP written as an integer?

On many systems, yes: ping 3232235777 resolves to 192.168.1.1 because inet_aton accepts a single 32-bit number. It is a common trick in phishing URLs, so treat it with suspicion in logs.

Why does Linux /proc/net/route show reversed hex?

The kernel prints the raw in-memory value, and x86 is little-endian. 0101A8C0 read byte by byte backwards is C0.A8.01.01 = 192.168.1.1.

Study and design tool. Validate any configuration in a lab and against vendor documentation before applying it in production.