IP to Decimal
Convert dotted IPv4 addresses to decimal, hex and binary integers, or decimal numbers back to IP addresses, many at once.
- Runs in your browser
- Free to use
About this tool
Databases, firewall logs and geolocation files often store IPv4 addresses as plain 32-bit numbers. This converter goes both ways in bulk: paste dotted addresses to get their decimal, hexadecimal and binary forms, or paste numbers (decimal or 0x hex) to recover the addresses. The table shows every representation side by side and a plain list of decimal values is provided for copying.
It replaces PHP's ip2long/long2ip, MySQL's INET_ATON/INET_NTOA and a calculator in one page, without sending anything to a server.
How to use it — quick steps
- 01
Enter the ip addresses or integers
Type or paste the ip addresses or integers in the field above, one item per line. Nothing is uploaded.
- 02
Press "Convert"
Press "Convert" or Ctrl + Enter. The result appears instantly below the form. Results can be copied.
- 03
Read the result
It appears in the dark panel under the form instantly. Every block has [copy] and other actions.
Key features of this tool
Nothing leaves your browser
The processing is plain JavaScript that runs on your device: the text you paste is never uploaded to our servers or to anyone else.
Instant results
Results appear the moment you press the button, even for long inputs, and every block has copy and download actions.
Works everywhere
No installation, no account and no limits: the tool works on desktop and mobile, in any modern browser, as often as you like.
Frequently asked questions
How is an IP converted to a decimal number?
Each octet is a byte of a 32-bit integer: a.b.c.d equals a×16777216 + b×65536 + c×256 + d. PHP calls this ip2long() and MySQL INET_ATON().
Why store IPs as integers?
Integers are compact and make range queries trivial: "is the address between the start and end of this block" becomes a numeric comparison.
Does it work with IPv6?
No, IPv6 addresses are 128-bit numbers that exceed what this tool displays. The IPv6 CIDR Calculator shows the expanded form of an IPv6 address.