Our IP address converter is a network engineering tool that will allow you to perform many types of conversion, such as:
- IP-binary conversions;
- IP-hex conversions;
- IP-decimal conversions; and
- IP-octal conversion.
It is a versatile tool; therefore, you can use it in many directions. For example, you can use it not only to convert from IP to hex but also from hex to IP addresses.
How to use this IP address converter
Here’s a brief guide to using this IP address converter:
- Select the format of the value you want to convert. You have the following options:
- IPv4/IPv6 standard format — for regular IP addresses such as 192.168.0.1 or 2001:db8::1;
- Binary;
- Hex;
- Decimal;
- Octal; and
- Autodetect — The calculator tries to automatically detect any of the formats above for your input. Some values may be valid in more than one format. In that case, the calculator will show an ambiguous input message and ask you to select the format manually.
- Enter your value: type or paste it in the “IP address” field.
- Read the conversion results. You’ll see the equivalent value in:
- Standard format;
- Binary;
- Hexadecimal;
- Decimal; and
- Octal.
How to manually convert an address from IP to hex, binary, decimal, and octal
The examples in this section all use IPv4, but note that the calculator also supports IPv6.
IP to hex
The easiest way is as explained in detail below:
- Divide the IP into its four octets.
- Convert them from decimal to hexadecimal.
- Join them all together.
IP to binary
This conversion will be really easy if you know how to convert from IP to hex. You only need two steps:
- Convert the IP to hexadecimal.
- Convert the IP from hexadecimal to binary.
In summary, IP → hex → binary.
IP to octal
This conversion will also be easy if you know a previous conversion: the IP-to-binary conversion. Example with 192.168.0.1:
- Binary:
11000000.10101000.00000000.00000001 - Remove dots:
11000000101010000000000000000001 - Convert such a binary to octal.
In summary, IP → binary → octal
IP to decimal
Going from IP to decimal is the easiest one if you know some elementary math: you need to use the base-256 formula:
a.b.c.d = a×256³ + b×256² + c×256 + d
Example: let’s convert 192.168.0.1:
= 192×256³ + 168×256² + 0×256 + 1
= 192×16777216 + 168×65536 + 0 + 1
= 3221225472 + 11010048 + 1
= 3232235521
FAQs
How do I convert an IP address to hex manually?
To convert an IP address to hexadecimal by hand:
- Split the address into its four octets.
- Convert each octet from decimal to hexadecimal.
- The hexadecimal numbers must be expressed using two digits, so from 0 to F, you must add a padding zero (e.g., don’t express the decimal
12asCbut as0C)
- The hexadecimal numbers must be expressed using two digits, so from 0 to F, you must add a padding zero (e.g., don’t express the decimal
- Join the four hex pairs.
As an example, let’s convert 192.168.0.1:
192 = C0;168 = A8;0 = 00;1 = 01.
Result: C0A80001. You can also write it in a grouped form as C0.A8.00.01.
How do I convert an IP address to binary?
To convert an IP address to binary, split the address into its four decimal parts and convert each part into an 8-bit binary number. For example, 192.168.0.1 becomes 11000000.10101000.00000000.00000001.
How do I express the IP 192.168.0.1 in binary?
192.168.0.1 in binary is expressed as 11000000101010000000000000000001. You can also write the binary number in different formats, such as 0b11000000101010000000000000000001 or 11000000.10101000.00000000.00000001.
How do I express the IP 192.168.1.1 in binary?
192.168.1.1 in binary is expressed as 11000000101010000000000100000001, 0b11000000101010000000000100000001, or 11000000.10101000.00000001.00000001.