IP Address Format Converter

Read an IPv4 address in any notation — dotted decimal, hex, dotted hex, decimal integer, octal or binary — and see all six representations plus the radix that was detected.

Input

Mode

Dotted decimal, 0x hex, dotted hex, 32-bit decimal, dotted octal or binary.

How the radix is chosen

Because guessing would be worse

Radix is decided by shape: 0x… or any a–f digit means hex; four dot-separated parts are read per part (a leading 0 makes that part octal); binary parts are read as binary when every part is 0/1 and shorter than 8 digits; otherwise a bare integer is decimal, or octal when it starts with 0. Every result is formatted as eight digits, so an all-digit bare value is shown as hexadecimal.

0xC0A80101 — the 0x prefix makes it hex.

0A000001 — a letter forces hex; 167772161 is the decimal spelling of the same value.

0300.0250.0001.0001 — every part has a leading zero, so all four are octal.

010.0.0.1 — a mix of octal and decimal parts, so it is rejected rather than reinterpreted.

Detected reading

Dotted decimal
Input
192.168.1.1
Read as
Dotted decimal
Dotted decimal
192.168.1.1
Hex
c0a80101
Hex (upper)
C0A80101
Hex dotted
C0A8.0101
Decimal (32-bit)
3232235777
Octal
30052000401
Octal dotted
0300.0250.0001.0001
Binary
11000000101010000000000100000001

Binary grouped by octet: 11000000.10101000.00000001.00000001

Which radix did you mean?

The same 32 bits, written the seven ways this converter accepts

NotationSpellingHow it is readCopy
Hexadecimal0x0A00000110.0.0.1different
Hexadecimal0A00000110.0.0.1different
Hexadecimal0A00.000110.0.0.1different
32-bit decimal integer16777216110.0.0.1different
Octal0120000000110.0.0.1different
Octal012.000.000.00110.0.0.1different
Binary00001010.00000000.00000000.0000000110.0.0.1different

These are the seven spellings of 10.0.0.1, which is 192.168.1.1. Notice that 010.0.0.1 is absent: a mixed octal/decimal quad is rejected instead of guessed at.

Frequently asked

Why did 10.0.0.1 not get read as hexadecimal?
Four dot-separated parts is dotted decimal to every network engineer, even though each part is also a valid hex value. Hex must say so: use the 0x prefix, write 0A00.0001 with two 16-bit halves, or include an a-f digit. 0A000001 is read as hex because of the A.
How is a bare all-digit value like 167772161 interpreted?
As a decimal 32-bit integer, which is how browsers and inet_aton accept it. If it starts with 0 it is read as octal instead, so 037777777777 is 255.255.255.255. A leading-zero value containing 8 or 9 is rejected rather than guessed at.
What is dotted octal used for?
It is the historical inet_aton form where each octet is written in octal, for example 0300.0250.0001.0001 for 192.168.1.1. Mixed forms such as 010.0.0.1 are rejected because guessing would silently redirect traffic to a different host.
Why does 0A000001 have a different meaning from 167772161?
They are the same 32-bit value seen two ways. 0A000001 is hexadecimal and 167772161 is its decimal form, and both are 10.0.0.1. The table shows every representation at once so the correspondence is never in doubt.
Can I paste a list of addresses?
Yes. Bulk mode reads one address per line, reports the detected radix for each and flags anything that could not be parsed. Results export to CSV, Markdown or JSON.

Next