IP to Decimal Converter

Convert an IPv4 or IPv6 address into the single decimal number it represents — and IPv4 decimals back again. Hex, octal and binary forms included for IPv4, with the working shown.

Other Tools

An IP address is already a number

Here is the secret this tool reveals: 192.168.1.1 and 3232235777 are the same address. The dotted form is just the 32-bit number split into four 8-bit bytes for human eyes. The decimal form is that number written as one integer:

192×256³ + 168×256² + 1×256¹ + 1×256⁰ = 3,232,235,777

The converter does this in both directions — address to number, number to address — and also shows the hexadecimal (c0a80101), octal and pure binary (11000000101010000000000100000001) spellings of the same 32 bits.

Diagram of the four octets of an IPv4 address, showing the network and host parts

Why the decimal form exists

  • Software and databases — storing IPs as one integer makes sorting, range checks and indexing trivial: "is this address between A and B?" becomes one numeric comparison. Geolocation databases are distributed exactly this way (start_int, end_int, location).
  • URLs and legacy systems — some parsers accept a decimal (or hex) address where a hostname is expected, a historical quirk that security tools still watch for, because http://3232235777/ hides 192.168.1.1 from casual reading.
  • Networking maths — subnetting, wildcard masks and ACL ranges are all simpler once you see the address as a number on a line.
  • Learning — nothing cements how IPv4 works like watching the four octets collapse into one number and back.

The maths, step by step

Address → decimal: multiply each octet by 256 raised to its position from the right (3, 2, 1, 0) and add. For 10.0.0.1: 10×16,777,216 + 0 + 0 + 1 = 167,772,161.

Decimal → address: divide by 16,777,216 for the first octet, take the remainder and divide by 65,536 for the second, then by 256 for the third; what is left is the fourth. The tool performs both instantly and shows the breakdown so you can check homework, configs or code against it.

The full range

Decimal IPv4 runs from 0 (0.0.0.0, the unspecified address) to 4,294,967,295 (255.255.255.255, broadcast). Familiar landmarks: 2130706433 is 127.0.0.1 (loopback), and the private 192.168.x.x block occupies 3232235520–3232301055. Generate test addresses with the Random IP Generator and convert them here to see the pattern.

Related representations

Hex form (c0a80101) is what appears inside IPv4-mapped IPv6 addresses — ::ffff:c0a8:0101 is 192.168.1.1 once more, wearing a third costume. Being fluent in all three spellings — dotted, decimal, hex — is what makes mixed logs and dual-stack systems stop looking like alphabet soup.

A caution about decimal URLs

Because decimal and hex addresses work in some browsers and libraries, they are occasionally used to disguise links. If a URL's "hostname" is one long number, decode it here before trusting it: the address it lands on may be a private or unexpected one. Legitimate services essentially never link this way.

Decimal form in the wild: three places you will actually meet it

Geolocation and firewall databases ship as integer ranges — the CSV you download says "this country owns 16777216 to 16777471" and expects you to know that means 1.0.0.0–1.0.0.255. Programming meets it whenever an address is packed into a 32-bit field: C's inet_addr, old APIs, and plenty of embedded systems return the decimal (sometimes in a different byte order — the classic gotcha when a converted address looks scrambled, e.g. 1.1.168.192 instead of 192.168.1.1; that is the same bits read little-endian, and it is a display issue, not a different address). Exams and interviews use it to test whether a candidate truly understands that the dots are formatting, not mathematics. Keep this converter open for all three — and build the underlying intuition by converting a few addresses by hand with the steps above.

Frequently asked questions

How do I convert an IP address to decimal manually?

Multiply the octets by descending powers of 256 and add them: for a.b.c.d the decimal is a×256³ + b×256² + c×256 + d. Example: 192.168.1.1 = 192×16,777,216 + 168×65,536 + 1×256 + 1 = 3,232,235,777.

What is the decimal of 127.0.0.1?

2130706433. It is the loopback address in single-number form — the same trick works for any IPv4 address, and the converter reverses it too.

Can I convert a decimal number back to an IP?

Yes — enter the number (0 to 4,294,967,295) and the tool splits it back into its four octets. Any integer in that range corresponds to exactly one IPv4 address.

Why do some URLs contain one long number instead of a domain?

Some software accepts a decimal (or hex) integer as an address. It is occasionally used to disguise where a link really goes, so decode unknown numeric URLs here before visiting them.

Does this work for IPv6?

Not directly — IPv6 is 128 bits, producing a 39-digit decimal that nothing uses in practice. For IPv6, use the notation converters: IPv6 to IPv4 and the IPv6 Compressor.

Looking for something else? Browse all 15 free IP tools or read the router guides on the blog.