IPv4 Address Converter
Convert an IPv4 address between dotted-decimal, 32-bit integer, hex and binary — and see whether it's private, public, loopback and more.
Dotted decimal
192.168.1.1
Integer (uint32)
3232235777
Hexadecimal
0xC0A80101
Binary
11000000.10101000.00000001.00000001
How to use
- Type or paste an IPv4 address, a 32-bit integer, or a 0x hex value.
- Read the dotted-decimal, integer, hex and binary forms side by side.
- Copy whichever representation you need; the address type is shown below.
About this tool
ShowHide
Enter an IPv4 address in any common form — dotted-decimal (192.168.1.1), a 32-bit integer (3232235777) or hex (0xC0A80101) — and this tool shows all of them at once, plus the binary octets. It also classifies the address: private, public, loopback, link-local, multicast, broadcast, shared (CGNAT) or reserved. Useful for firewall and ACL rules, database storage (IPs are often kept as integers), log parsing and learning how addresses map to numbers. Everything is computed locally in your browser.
The integer form is the one worth storing, and the reason is size rather than elegance. An IPv4 address is exactly 32 bits, so it fits an unsigned integer column in four bytes, while the dotted string takes up to fifteen and cannot be compared or ranged without parsing. A firewall rule asking whether an address falls inside a block is an integer comparison once both sides are numbers, and a string comparison gets it wrong the moment the octets have different digit counts.
Signed storage is where this goes wrong in practice. Anything from 128.0.0.0 upward has the top bit set, so a signed 32-bit column stores it as a negative number and every naive range query against it fails. That is half the address space, and the bug hides until the day a user turns up on a high address.
Dotted-decimal is more permissive than people expect. The traditional parser accepts fewer than four parts, treating the last as the remainder, and reads a leading zero as octal, so 010.1 is a legal way to write 8.0.0.1 and 127.1 is a legal way to write 127.0.0.1. Modern libraries mostly reject these, but not all of them do, and the mismatch between two parsers on the same string has been the basis of real access-control bypasses.
The classification comes from the reserved-range registry rather than from anything in the number, and those ranges have been added to. 100.64.0.0/10 for carrier-grade NAT arrived in 2012, which is recent enough that older tools report it as ordinary public space.
Frequently asked questions
Why store an IP as an integer?
A 32-bit integer is compact and fast to index and compare in databases, so ranges and lookups are efficient. 192.168.1.1 is the integer 3232235777.
How is the integer calculated?
Each octet is a byte: integer = a×2²⁴ + b×2¹⁶ + c×2⁸ + d. So 192.168.1.1 = 192×16777216 + 168×65536 + 1×256 + 1 = 3232235777.
What do the address types mean?
Private (10/8, 172.16/12, 192.168/16) and loopback (127/8) aren't routable on the internet; link-local (169.254/16) is auto-assigned; shared (100.64/10) is carrier-grade NAT; the rest is public.
Does it support IPv6?
This tool is for IPv4. For IPv6 work, use a dedicated IPv6 tool such as the IPv6 expander.
Why does my database show 3232235777 instead of an address?
Because it stored the integer form. 3232235777 is 192.168.1.1 — the four octets packed into a single 32-bit number. Older schemas and some ORMs still do this because an integer indexes and range-queries far better than a string, and a subnet becomes a simple BETWEEN.
Is 192.168.01.1 the same address as 192.168.1.1?
It depends who is parsing, which is exactly why it is dangerous. Some libraries read a leading zero as octal, making 01 into 1 but 010 into 8, and others reject the form outright. Never write leading zeros in an address, and be suspicious of any input that contains them.
Related tools
IP Address Inspector
Type an IPv4 or IPv6 address and see its class, scope (private / public / loopback / link-local), decimal value, binary, reverse-DNS notation, and /32 CIDR.
Network
Subnet Calculator (IPv4 / CIDR)
Parse an IPv4 CIDR into network address, broadcast, netmask, wildcard, host range, and class. Shows binary breakdown and private/public status.
Network
IP Range Expander
Expand a CIDR block (10.0.0.0/24) into a list of IPs, or convert a start-end range into the smallest covering CIDR set.
Network
CIDR Aggregator (Merge & Summarize IP Ranges)
Coalesce a messy list of IPv4/IPv6 addresses, CIDR blocks, and ranges into the smallest equivalent set of CIDR prefixes.
Network
Random IP & MAC Generator
Generate batches of random IPv4, IPv6, or MAC addresses for tests and mocks — public / private / ULA / link-local / UAA / LAA scopes supported.
Random
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
Convert