IP to Decimal Converter

Convert IP addresses to decimal numbers and back, and decode numeric link hosts.

The direction is detected from what you paste. One per line for many; results update as you type.

Result

192.168.1.1 →

3232235777

Decimal (unsigned)3232235777
Signed 32-bit-1062731519
As a link (opens this address)http://3232235777/

How it's calculated

  1. 192 × 16,777,216 = 3,221,225,472
  2. 168 × 65,536 = 11,010,048
  3. 1 × 256 = 256
  4. 1 × 1 = 1
  5. Total: 3,232,235,777 (3232235777)

How to Convert an IP Address to Decimal

An IPv4 address is a 32-bit number: 192.168.1.1 = 192×256³ + 168×256² + 1×256 + 1 = 3232235777. This tool converts both ways, for IPv4 and IPv6, and shows the forms databases use.

Multiply each octet by 256³, 256², 256 and 1 and add them:

OctetPlace valueProduct
192256³ = 16,777,2163,221,225,472
168256² = 65,53611,010,048
1256256
111
Total3,232,235,777

How to Convert a Decimal Number Back to an IP

Divide by 256 repeatedly and read the remainders backwards, or paste the number above.

3232235777 ÷ 256 = 12625921 remainder 1; ÷ 256 = 49319 remainder 1; ÷ 256 = 192 remainder 168. Reading 192, then the remainders from last to first, gives 192.168.1.1. Numbers from 4294967296 up to 39 digits are read as IPv6, and negative numbers as signed 32-bit values.

Storing IP Addresses in a Database

Store IPv4 as an unsigned 32-bit integer (INT UNSIGNED) or use native types like PostgreSQL inet; IPv6 needs 128 bits.

DatabaseHow
MySQL / MariaDBINET_ATON('192.168.1.1') → 3232235777 in an INT UNSIGNED column; INET_NTOA() back. For IPv6: INET6_ATON() into VARBINARY(16).
PostgreSQLThe inet type stores IPv4 and IPv6 and supports subnet operators: '192.168.1.1'::inet << '192.168.0.0/16'. '192.168.1.1'::inet - '0.0.0.0'::inet gives 3232235777.
Java, C#, signed INT columnsA signed 32-bit integer holds 192.168.1.1 as -1062731519. Use a 64-bit (long) value, or add 4294967296 to negative values.

Integers make range checks fast (BETWEEN on the start and end of a block); native types are clearer and handle IPv6.

Decimal IPs in Links (a Phishing Trick)

Browsers accept http://3232235777/; decimal hosts can hide where a link goes.

Browsers follow the URL standard, which reads a host made of numbers as an IPv4 address in decimal, hex (0xC0A80101), octal (0300.0250.01.01) or shortened forms (192.168.257). All of these open 192.168.1.1. Attackers use them to make a link look like something other than an address. Paste a suspicious link above and the converter shows the address a browser would open. For a suspicious email, the email header analyzer shows where it really came from.

How This Tool Works

ItemDetail
Where it runsIn your browser; nothing is sent to our server.
Input checksStrict: each IPv4 number 0-255 in decimal, IPv6 in any standard form (including ::ffff:192.0.2.1 and zones). Invalid input gets the reason, never a silent guess.
Many at onceOne value per line, up to 1,000 lines; each line is converted on its own.
Shareable link?q= followed by a value opens the page with it converted.
LinksHosts are read the way browsers do (WHATWG URL standard), checked against the parser built into Node.js.
StoredNothing.
Last verified10 November 2026

Frequently Asked Questions

How do I convert an IP address to a decimal number?
Multiply each octet by its place value and add them: 192.168.1.1 → 192 × 16,777,216 + 168 × 65,536 + 1 × 256 + 1 = 3232235777.
How do I convert a decimal number to an IP address?
Paste it above, or divide by 256 three times and read the remainders backwards: 3232235777 → 192.168.1.1.
Why does my database show a negative number for an IP?
It stored the address as a signed 32-bit integer, where values above 2147483647 wrap around. Add 4294967296 to get the unsigned value: -1062731519 + 4294967296 = 3232235777, which is 192.168.1.1.
Can IPv6 be converted to decimal?
Yes, as a 128-bit integer of up to 39 digits: 2001:db8::1 is 42540766411282592856903984951653826561.

Next steps

Related Tools

IP to Hex Converter
An IP address in hexadecimal, and back.
IP to Binary Converter
An IP address in binary, bit by bit, and back.
Subnet Calculator
Network, broadcast, mask and host range of any IPv4 subnet.
IP Class Checker
The class (A to E) of an IPv4 address.