IP to Octal Converter

Rewrite IPv4 addresses in base 8, in the notation your firewall rule or security test expects.

IPv4
Octal
Runs locally in your browser

About the IP to Octal Converter

Octal IPv4 notation is a quirk of the old inet_aton parser: an octet that starts with a zero is read as base 8, so 0300.0250.01.01 and 192.168.1.1 point at the same host. Security engineers use that fact to check whether a URL filter, allowlist or SSRF guard normalises addresses before comparing them, and this converter produces the test strings.

Four output shapes are available. Leading zero is the classic form that inet_aton and many libraries accept. Plain digits drop the marker, which suits documentation or a base conversion exercise. Padded writes three octal digits per octet for columns that need to line up. The single number form folds all 32 bits into one octal value such as 030052000401.

Each line is validated before conversion, so an octet above 255 or a value with the wrong number of parts is reported with the exact line content rather than producing a plausible looking wrong answer. A trailing CIDR suffix is trimmed, which means a list copied from a routing table converts without cleanup.

Reverse the operation with Octal to IP. For the base 16 and base 2 equivalents there are IP to Hex and IP to Binary, and CIDR Calculator covers whole ranges.

How to use

  1. Paste one IPv4 address per line.
  2. Pick the octal format your target system accepts.
  3. Read the converted list on the right.
  4. Copy it, or click Swap to convert octal back to dotted decimal.

Common questions

Why does an octet convert to 0377?
Because 255 in base 8 is 377, and the leading zero marks the value as octal for parsers that follow the inet_aton rules.
Is octal notation valid in a browser address bar?
Many clients still accept it and resolve it to the same host, which is exactly why it is worth testing your own filters against it.
What does the single number option produce?
The whole address as one 32 bit value written in base 8, the octal counterpart of the decimal integer form.
Can I convert a CIDR block?
The prefix length is stripped and the network address is converted. Use the CIDR Calculator to expand the range itself.