ToolsForWeb

IP Base Converter

Convert an IPv4 address between its dotted-decimal form and its 32-bit integer, hexadecimal and binary representations.

Loading tool…

About this tool

An IPv4 address is really a single 32-bit number; the familiar dotted-decimal form is just one way to write it. Paste an address in any of four shapes — dotted-decimal (192.168.1.1), a plain 32-bit integer (3232235777), hex (0xC0A80101 or a bare 8-digit C0A80101), or binary (32 bits, or four dotted binary octets) — and the tool detects the shape, validates that the value fits in 0–4294967295, and shows all of the representations at once, plus the reverse-DNS name (1.1.168.192.in-addr.arpa). Everything runs in your browser.

When to use it

Reading an IP that a router, firewall log or packet capture printed as a decimal or hex integer.
Writing ACLs or code that stores addresses as integers and needs the dotted form back.
Constructing the in-addr.arpa name for a PTR record or a reverse-DNS zone.
Checking the bit pattern of an address against a mask by eye.

Questions

How does it tell hex from decimal for a bare number?

By shape. A 0x prefix is always hex; 32 binary digits are binary; an 8-character string that contains a–f is hex; anything that is all decimal digits is read as a decimal integer. So 3232235777 is decimal and C0A80101 is hex, but an all-digit 8-character string is treated as decimal — prefix it with 0x if you meant hex.

What is the in-addr.arpa value for?

It is the name used for reverse DNS: a PTR lookup for 192.168.1.1 queries 1.1.168.192.in-addr.arpa. The octets are reversed because DNS names get more specific right to left.

Does it handle IPv6?

No. This tool is IPv4 only — the value must fit in 32 bits. IPv6 uses 128-bit addresses and a different text format (and ip6.arpa for reverse DNS).

Related tools