How Do I Convert an IP Address to Decimal, Binary, or Hex?

Updated 2026-06-27

To convert an IP address to decimal, binary, or hex, paste it into the IP Address Converter, choose the IPv4 tab, and read the converted forms instantly. An IPv4 address like 192.168.0.1 becomes the decimal integer 3232235521, the hex value 0xc0a80001, a per-octet binary string, and an octal form, all at once. Because every conversion runs in your browser, nothing you type is ever uploaded.

Why convert an IP address at all?

An IPv4 address is really just a 32-bit number wearing a friendly dotted-quad costume. Different systems want it in different forms:

Rather than doing the bit-shifting by hand, the IP Address Converter gives you every representation side by side with a copy button on each row.

Converting IPv4 in both directions

The IPv4 tab is bidirectional and auto-detects what you typed:

The rule is simple: if your input contains a dot it is parsed as an address, otherwise it is treated as a 32-bit integer. Decimal inputs must fall in the valid 0 to 4294967295 range, so a typo that overflows is caught instead of silently producing garbage.

The binary and octal outputs are deliberately split per octet and joined with dots so they align with the four parts of the original address. That makes it easy to map, say, the third octet to its exact 8 bits when you are working out a netmask.

Expanding and compressing IPv6

IPv6 addresses are 128-bit numbers, and the same address can be written many ways thanks to the :: shorthand that collapses runs of zeros. Switch to the IPv6 tab and enter either form:

The tool shows the expanded form (every group spelled out), the compressed shortest form, the 128-bit integer, and the hex value. This is handy for normalizing addresses before comparing them, since two strings that look different can be the exact same address.

Privacy: it all stays on your machine

IP addresses, especially internal ones, can reveal details about your network topology. With this tool there is nothing to worry about: the conversions are pure client-side JavaScript that run locally in your browser, so addresses are never sent to a server, stored, or logged. You can safely convert private-range and internal addresses.

When you are done converting and want to plan an actual network, pair this with the Subnet Calculator to work out ranges, masks, and host counts from a CIDR block. Together they cover most day-to-day IP chores without a single byte leaving your device.

Try the IP Address Converter →