Skip to content
Toolew.com

IP to Decimal Converter

Convert an IPv4 dotted-quad address to its single 32-bit decimal integer (and hex/binary) form, and back.

Runs in your browser. Your data is not uploaded.
Loading tool…

This guide is not yet available in your language and is shown in English.

Tool guide

What this tool does

IP to Decimal Converter converts an IPv4 address between its familiar dotted-quad notation (like 192.168.1.1) and its equivalent single 32-bit decimal integer, along with hexadecimal and binary representations, in either direction.

An IPv4 address is really just a 32-bit number, the familiar dotted-quad notation (four 0-255 numbers separated by dots) is just a human-readable way of writing it; databases, some APIs and low-level networking code often store or expect it as a single integer instead.

This converter goes both directions: IPv4 notation to its decimal (and hex/binary) integer equivalent, or a decimal integer back to standard dotted-quad IPv4 notation.

How to use IP to Decimal Converter

  1. Choose a Direction: IPv4 → decimal or decimal → IPv4.
  2. Enter the address or integer to convert.
  3. Read the Decimal, Hexadecimal and Binary results.
  4. Copy whichever representation your database or script expects.

Tips for better results

  • Each of the four dotted-quad numbers corresponds to one byte (8 bits) of the 32-bit integer, in order: the first number is the most significant byte.
  • A valid IPv4-derived integer always falls between 0 and 4,294,967,295 (2³² − 1); anything outside that range can’t represent a real IPv4 address.
  • Some older systems and a handful of databases still store IP addresses as a plain integer for compact storage and fast range queries, this conversion is exactly what’s needed to work with those.
  • The binary output is grouped into 4 bytes of 8 bits each (separated by dots) to make it easier to see the correspondence with the original dotted-quad notation.

Common use cases

  • Converting an IP address to an integer for storage in a database column that expects a number.
  • Debugging low-level networking code that represents addresses as 32-bit integers.
  • Understanding the bit-level relationship between dotted-quad notation and the underlying binary address.
  • Converting a decimal IP value found in a log or API response back into readable dotted-quad form.

Common mistakes to avoid

  • Entering a decimal value outside the valid 0 to 4,294,967,295 range, which can’t correspond to any real IPv4 address and is flagged as an error.
  • Assuming this works for IPv6 addresses; IPv6 uses 128 bits, not 32, so this specific integer conversion only applies to IPv4.
  • Mixing up byte order when manually reconstructing an address from hex or binary elsewhere; this tool always uses standard big-endian (network byte order), the same order IPv4 dotted-quad notation itself uses.

Frequently asked questions

Why convert an IP address to a number?

Some databases and low-level systems store IP addresses as a single integer for compact storage and efficient range queries (e.g. "is this IP between X and Y"), rather than as a text string.

What’s the maximum possible value?

4,294,967,295 (2³² − 1), corresponding to the IPv4 address 255.255.255.255, the highest possible 32-bit unsigned integer.

Does this work for IPv6?

No, IPv6 addresses are 128 bits, not 32, so this specific decimal conversion only applies to IPv4; use the IPv6 Expander and Compressor for IPv6 address formatting instead.

What byte order is used?

Standard big-endian (network byte order), the same order used in IPv4 dotted-quad notation itself, where the first number is the most significant byte.

Feedback & suggestions

Help us improve IP to Decimal Converter. We read every message.

Rating (optional)
Necessary
Required for security, language and theme preferences. Always on.