Format Code Now
/

Hex to IP Converter

CU-13

Paste a hex IPv4 address, either as one value like 0xC0A80101 or as four hex octets, and get the dotted decimal address. The second button writes an address as hex.

Runs in your browser. Nothing is uploaded.

Hex or IPv4 addresses (one per line)

Result

How to use it

  1. Paste one hex address per line, such as C0.A8.01.01 or 0xC0A80101.
  2. Press Hex to IP to get dotted decimal addresses.
  3. To go back, paste dotted addresses and press IP to hex.
  4. Choose four dotted octets or one 8-digit number, and uppercase or lowercase.
  5. Copy the result or download it as a .txt file.

Hex notation for IPv4

Each octet of an IPv4 address fits in two hex digits, so 192.168.1.1 is C0.A8.01.01, or C0A80101 as a single 32-bit value. You see the single form in packet captures, firewall logs and some config files, often with a 0x in front. This tool reads either layout: four hex octets separated by dots or spaces, or one value of up to eight hex digits. An octet above FF, or a single value above FFFFFFFF, is reported as an error.

Scope and limits

It converts notation only. It handles IPv4, not IPv6, and it does not say whether an address is routable or in use. Byte order is taken as written, most significant octet first, so it does not reverse bytes for little-endian values; if a log shows 0101A8C0, reverse the octets yourself first. Decimal octets with a leading zero are rejected in the IP to hex direction because some systems read them as octal.

Error messages and what to do

MessageWhat it meansFix
Octet "1FF" in "1FF.0.0.0" is above 255 (in hexadecimal that is FF).A hex octet is larger than FF.Keep each octet to two hex digits at most, with a value up to FF.
"C0.A8.01" has 3 parts. Write either one hexadecimal number or four hexadecimal octets separated by dots.The line has a number of parts other than one or four.Give four octets, or write the whole address as one value of up to 8 digits.

Questions people ask

How do I convert hex to an IP address?

Split the 8 hex digits into four pairs and convert each pair to decimal: C0 is 192, A8 is 168, 01 is 1. Paste the hex and press Hex to IP to do it for every line, with or without a 0x prefix.

What is 0x7F000001 as an IP address?

7F000001 is 127.0.0.1, the loopback address: 7F is 127, then 00, 00 and 01. Paste it, with or without the 0x prefix, and press Hex to IP to check the conversion.

How do I convert an IP address to hex?

Write each decimal octet as two hex digits: 192.168.1.1 becomes C0.A8.01.01. Press IP to hex, and pick One 32-bit number if you want C0A80101 without the dots. The Add a prefix option puts 0x in front of the single value.

Does the tool handle little-endian hex?

No. It reads the first octet as the most significant, which is how addresses are normally written. For a value stored byte-reversed, such as 0101A8C0 for 192.168.1.1, reverse the byte pairs first.

Which hex formats are accepted?

Four hex octets separated by dots or spaces, or a single value of up to 8 digits. A 0x prefix, colons and underscores are tolerated, and upper or lower case both work. Each line is converted separately, so you can paste many addresses at once.

About this tool

Reads each line as either four hex octets separated by dots or spaces (for example C0.A8.01.01) or one hex number of up to 8 digits (such as C0A80101 or 0xC0A80101), and writes the dotted IPv4 address. Every octet must be FF or less; a value above that, or more than 32 bits, is an error. The second button writes an IPv4 address as four 2-digit hex octets, or as one 8-digit number. It handles IPv4 only, not IPv6, and it does not look an address up. Addresses with leading zeros in a decimal octet are rejected because some systems read them as octal.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.