Skip to content
OddsockLocal
Local
Source text

The preview shows up here.

ReadyRuns in this browser. Nothing is uploaded.

How to use

  1. Enter a dotted IPv4 address, or an unsigned 32-bit integer in decimal, 0x hex or 0b binary.
  2. Read the dotted form, the integer, the hex and the 32-bit binary.
  3. Read the mapped IPv6 form if the next field is an IPv6 column.
  4. A value outside 0–255 in any octet, or outside 32 bits, is an error.

What is IP address converter?

IPv4 addresses are 32-bit numbers that people write as four decimals. 192.0.2.1 is the integer 3221225985, the hex value 0xc0000201, the 32 bits 11000000000000000000001000000001, and the mapped IPv6 address ::ffff:192.0.2.1. Any of those forms can be the input: dotted decimal, a decimal integer, 0x hex or 0b binary.

Read more

Each octet has to be 0–255 with no extra leading-zero tricks that would make 08 look like a different base. 256.0.0.1 is rejected. The all-ones value 0xffffffff is 255.255.255.255. Values outside the unsigned 32-bit range are rejected, so a negative number or a 33-bit integer does not wrap.

The mapped IPv6 form is the conventional ::ffff: embedding used when an IPv4 address is written in an IPv6 field. It is not a calculation of a subnet. The subnet calculator is the page for network, broadcast and host counts.

Use cases

  • A firewall log stores 3221225985 and you need 192.0.2.1 before you search the ticket.
  • A config wants the address as 0xc0000201 and you have the dotted form.
  • You are documenting an IPv4-mapped address and want ::ffff:192.0.2.1 written out.
  • A parser bug accepts 256.0.0.1 and you want a page that does not.

Documentation address 192.0.2.1

192.0.2.1

ipv4 192.0.2.1, integer 3221225985, hex 0xc0000201, binary 11000000000000000000001000000001, mappedIPv6 ::ffff:192.0.2.1.

Why use Oddsock

The integer and the dotted form are the same 32 bits. Seeing both stops a log parser from treating 3221225985 as a timestamp.

Related tools

Using this tool

3221225985. In hex that is 0xc0000201. The 32-bit binary starts 11000000, which is 192.