IPNixa / ADDRESS TOOLS

IP Converter: IP to Decimal, Binary, Hex & Back

Paste an IP address in any format, a number or a whole link. The converter detects the notation, shows every format side by side and reveals the real address behind disguised links such as http://3232235777.

  • Detects dotted, decimal, hex, binary and octal input
  • Reveals the real IP behind disguised links
  • List conversion with CSV, plus Excel, SQL and code
Try an example

Calculation happens in this browser. No address lookup or server request is made.

Ready. Inputs are not added to the URL or analytics.

Convert a list

How to use this tool

  1. Paste an IP address, a number or a link. The format is detected as you type.
  2. Read every representation side by side, including octal and each octet in binary.
  3. Convert a whole list at once, or copy the formula for Excel, SQL, Python or JavaScript.

Read the result

An IPv4 address contains 32 bits; an IPv6 address contains 128. Different text formats can represent the same value. Canonical IPv6 uses lowercase hexadecimal and compresses the longest run of zero groups, choosing the first run when lengths tie. Expanded form shows all eight groups. Decimal conversion uses exact integers rather than floating-point rounding. Conversion does not identify a device, locate an IP or make an IPv4-only connection support IPv6.

IP to decimal in Excel, SQL and code

The same conversion in tools you already use. Each example turns 192.168.1.1 into 3232235777 and back.

Excel
=SUMPRODUCT(--MID(SUBSTITUTE(A1,".",REPT(" ",99)),{1,100,199,298},99)*256^{3,2,1,0})
Google Sheets
=SUMPRODUCT(SPLIT(A1,".")*256^{3,2,1,0})
MySQL / MariaDB
SELECT INET_ATON('192.168.1.1'), INET_NTOA(3232235777);
PostgreSQL
SELECT '192.168.1.1'::inet - '0.0.0.0'::inet, '0.0.0.0'::inet + 3232235777;
Python
import ipaddress
int(ipaddress.ip_address('192.168.1.1'))  # 3232235777
str(ipaddress.ip_address(3232235777))     # '192.168.1.1'
JavaScript
'192.168.1.1'.split('.').reduce((n, o) => n * 256 + Number(o), 0); // 3232235777
[24, 16, 8, 0].map(s => (3232235777 >>> s) & 255).join('.');      // '192.168.1.1'

Questions and answers

How do I convert a decimal number back to an IP address?

Paste the number, for example 3232235777. Numbers up to 4,294,967,295 are read as IPv4, the way a browser reads them; larger numbers are read as IPv6. To force a family, choose it under Input format.

Why does a link like http://3232235777 open a website?

Browsers accept an IPv4 address written as one number, in hexadecimal or in octal, and all of these open 192.168.1.1. These spellings are used to hide where a link goes, so paste a suspicious link here to see the real address.

Is a compressed IPv6 address a different address?

No. For example, 2001:db8::1 and its fully expanded form contain the same 128-bit value. Compression changes the spelling, not the network endpoint.

Are private and documentation addresses supported?

Yes. Conversion is local mathematics, so private, loopback and documentation addresses are accepted. No request is made to the address.

Other address tools