IP Address Converter

Quick answer

The IP address converter translates an IPv4 or IPv6 address between dotted-decimal or colon notation and its binary, hexadecimal, decimal and octal forms, detects the input format automatically and also gives the expanded IPv6 form and the IPv4-mapped address.

Standard notation
192.168.0.1
Version
IPv4
How the input was read
Read as a standard address: IPv4 dotted-decimal address
Binary
11000000 10101000 00000000 00000001
Dotted binary
11000000.10101000.00000000.00000001
Hexadecimal
0xC0A80001
Hex by octet / group
C0.A8.00.01
Decimal integer
3,232,235,521
Octal
30052000001
IPv4-mapped IPv6
::ffff:192.168.0.1
Address class (historic)
C

An IP address is just a number. IPv4 addresses are 32-bit numbers written as four decimal octets (192.168.0.1); IPv6 addresses are 128-bit numbers written as eight groups of four hexadecimal digits, with runs of zero groups shortened to “::” (2001:db8::1). Firewalls, databases, packet captures and spreadsheets sometimes store the same address as a plain integer, a hex string or a string of bits, and converting by hand is slow and error-prone.

Paste an address in any form and the converter shows all the others. In automatic mode it recognises dotted IPv4, IPv6 with or without compression (including embedded IPv4 such as ::ffff:192.0.2.1), long binary strings, hex with or without 0x, and decimal integers. If a value could be read more than one way – “1010” could be binary or decimal – choose the format in the menu.

For IPv4 you also get the dotted binary and dotted hex forms, the class and the IPv4-mapped IPv6 address; for IPv6 you get both the compressed (RFC 5952) and the fully expanded notation.

How to use the IP Address Converter

  1. IP address
  2. Input format
  3. IP version (for numeric input)

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

The input is parsed into a single integer – 32 bits for IPv4, 128 bits for IPv6 – using exact big-integer arithmetic, and that integer is printed in every base. IPv6 compression replaces the longest run of two or more zero groups with “::”.

Worked example

192.168.0.1: the octets are 192, 168, 0 and 1. In hex they are C0, A8, 00, 01 → C0A80001; in binary 11000000 10101000 00000000 00000001; as one integer 192 × 256³ + 168 × 256² + 0 × 256 + 1 = 3,232,235,521; in octal 30052000001. The IPv6 address 2001:db8::ff00:42:8329 expands to 2001:0db8:0000:0000:0000:ff00:0042:8329.

IPv4 octet cheat sheet

Decimal Binary Hex
0 00000000 00
10 00001010 0A
127 01111111 7F
128 10000000 80
172 10101100 AC
192 11000000 C0
255 11111111 FF

Formula

IPv4 decimal = a × 256³ + b × 256² + c × 256 + d · each octet = 8 bits = 2 hex digits · IPv6 = 128 bits = 8 groups of 4 hex digits

Worked example

Inputs — IP address: 192.168.0.1; Input format: Detect automatically; IP version (for numeric input): Automatic.
Results — Standard notation = 192.168.0.1; Version = IPv4; How the input was read = Read as a standard address: IPv4 dotted-decimal address; Binary = 11000000 10101000 00000000 00000001; Dotted binary = 11000000.10101000.00000000.00000001; Hexadecimal = 0xC0A80001.

Key terms

Octet
One of the four 8-bit parts of an IPv4 address.
Hextet
One of the eight 16-bit groups of an IPv6 address.
Zero compression
Writing a run of zero groups in IPv6 as "::".
IPv4-mapped address
An IPv6 form (::ffff:0:0/96) that holds an IPv4 address.

Frequently asked questions

How do I convert an IP address to decimal?

Multiply the octets by powers of 256: 192.168.0.1 = 192 × 16,777,216 + 168 × 65,536 + 0 × 256 + 1 = 3,232,235,521.

How do I convert an IP address to hex?

Convert each octet to two hex digits: 192 = C0, 168 = A8, 0 = 00, 1 = 01, so C0A80001.

What is 192.168.0.1 in binary?

11000000.10101000.00000000.00000001.

How many bits does an IPv6 address have?

128, written as eight 16-bit groups in hexadecimal.

What does :: mean in IPv6?

One or more groups of zeros. It may appear only once in an address.

What is an IPv4-mapped IPv6 address?

::ffff:a.b.c.d – the way dual-stack software represents an IPv4 address inside IPv6.

Can a decimal number like 3232235521 be used as an address?

Many tools (including ping on some systems) accept it, which is why it appears in logs and phishing links.

Sources

  1. RFC 4291 – IP Version 6 Addressing Architecture
  2. RFC 5952 – A Recommendation for IPv6 Address Text Representation
  3. RFC 791 – Internet Protocol

Cite this calculator

Speedy Calculator. (2026). IP Address Converter. Speedy Calculator. https://speedycalculator.com/calculators/other/ip-address-converter/