Skip to content

IP to Decimal Converter

Get the integer behind an IP address, in decimal or hex, for one address or a whole list.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is IP to Decimal Converter?

An IPv4 address is really a 32-bit unsigned integer: 192.168.1.1 equals 192×256³ + 168×256² + 1×256 + 1 = 3232235777. Databases, firewalls and geo-IP tables often store addresses as integers because range checks and sorting become simple numeric comparisons.

This converter handles IPv4 and IPv6 (a 128-bit integer, computed exactly with BigInt) and prints decimal, 0x-prefixed hexadecimal, or both. Enter one address per line and optionally label each result with its input.

How does it work?

  1. Paste addresses, one per line (IPv4 and IPv6 can be mixed).
  2. Pick decimal, hexadecimal or both.
  3. Copy the numbers into your query or spreadsheet.
  4. Use Swap to convert integers back to addresses.

Common use cases

  • Storing IPs as integers in a database and testing whether an address falls between two numeric bounds.
  • Understanding how IP-to-country CSV files list ranges as start and end integers.
  • Decoding an integer IP found in a URL or obfuscated link to see the real address.
  • Producing hex forms such as 0xC0A80101 for low-level code or packet analysis.

Examples

Try this input in the tool above:

Input
192.168.1.1
10.0.0.1
2001:db8::1
Output
3232235777
167772161
42540766411282592856903984951653826561

Privacy

IP to Decimal Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Integers do not identify byte order: the results use standard network (big-endian) order, which matches inet_aton but not little-endian dumps.

Frequently asked questions

What is 192.168.1.1 as a decimal number?

3232235777, or 0xC0A80101 in hexadecimal.

How large can IPv6 integers be?

Up to 2^128 − 1. JavaScript BigInt keeps every digit exact, so nothing is rounded.

Why do some sources show a different number for the same IP?

They may use little-endian byte order or treat the number as signed. This tool uses unsigned network byte order.

More tools in Network Tools →