Octal to IP: normalize base-8 addresses
Octal addresses rarely appear by accident. They show up in security test cases, in obfuscated links and in configs where someone zero-padded an octet. The octal to IP converter reads such values as base 8 and prints the plain dotted-decimal address, so you can see which host is really meant.
Decoding a dotted octal address
Each part is multiplied out by 64, 8 and 1. For 0254.0020.0376.0001:
0254= 2 × 64 + 5 × 8 + 4 = 1720020= 2 × 8 = 160376= 3 × 64 + 7 × 8 + 6 = 2540001= 1
The address is 172.16.254.1. A quick way to check your work: no valid octal part can be larger than 0377, because 3 × 64 + 7 × 8 + 7 = 255, the largest value an octet can hold.
Accepted formats
0300.0250.0001.0001 → 192.168.1.1
0177.0.0.1 → 127.0.0.1
377.377.377.377 → 255.255.255.255
030052000401 → 192.168.1.1
17700000001 → 127.0.0.1
- Dotted: four parts of one to four octal digits. The leading 0 is optional once Input format is set to Octal; on Auto, an address is recognized as octal only when at least one part has four digits.
- Single number: the whole 32-bit address as one octal value, up to 037777777777. This page starts on Octal; on Auto, a lone number is read as decimal.
- Digits 8 and 9 do not exist in octal and are rejected, as is any part above
0377(255).
Strict octal versus real-world parsers
With Octal selected, this converter is deliberately strict: 10.0.0.1 is read as octal and becomes 8.0.0.1. Real parsers such as inet_aton() decide per part instead — a leading 0 means octal, 0x means hex, anything else is decimal — and they also accept shortened forms such as 127.1. So for mixed input like 192.168.010.1, convert only the zero-prefixed part: 010 is 8, giving 192.168.8.1.
When you review logs or proxy rules, normalize every address to dotted decimal before you compare it with an allow-list or block-list. Comparing raw strings is how octal and hex spellings slip past filters.
How common tools read the same string
You can see the difference between strict and lenient parsing on any Linux machine. The C library's inet_aton() treats a leading zero as octal, so ping 0177.0.0.1 pings 127.0.0.1. Python exposes that function too:
import socket, ipaddress
socket.inet_ntoa(socket.inet_aton("0177.0.0.1")) # '127.0.0.1'
ipaddress.ip_address("0177.0.0.1") # ValueError since Python 3.9.5The ipaddress module used to ignore leading zeros and read the part as decimal, which let 0177.0.0.1 pass as 177.0.0.1. Newer versions reject such strings outright. That inconsistency between parsers is exactly why security reviews normalize addresses with a tool like this one before comparing them.
Related converters
To produce octal from a normal address, use IP to Octal. For hex-encoded addresses such as 0x7F000001, use Hex to IP, and for single octal numbers that are not addresses, Octal to Decimal. Decoding happens in your browser.