Home/Tools/IPv4 to Decimal Converter

IPv4 to Decimal Converter

Convert IPv4 addresses to their 32-bit decimal (integer) representation and back. Useful for networking scripts and firewall rules.

IP & Network Tools

View All Tools →
Your result will appear here

IPv4 to Decimal Conversion Explained

The IPv4 to decimal conversion process transforms a standard dotted IP address (like 192.168.1.1) into a single 32-bit integer. This format is commonly used in networking systems, databases, and firewall rules where storing IP addresses as numbers is more efficient.

An IPv4 address consists of four octets separated by dots. Each octet is an 8-bit number ranging from 0 to 255. When combined, they form a 32-bit unsigned integer. For example, 192.168.1.1 converts to 3232235777.

How to Convert IPv4 to Decimal

To convert an IPv4 address to decimal, each octet is multiplied by powers of 256 based on its position:

  • First octet × 256³
  • Second octet × 256²
  • Third octet × 256¹
  • Fourth octet × 256⁰

The final decimal value is the sum of all four results. This method ensures every IPv4 address maps to a unique integer.

Example Conversion

For the IP address 192.168.1.1:

  • 192 × 256³ = 3221225472
  • 168 × 256² = 11010048
  • 1 × 256¹ = 256
  • 1 × 256⁰ = 1

Total = 3232235777

Why Convert IP Addresses to Decimal?

Converting an IP address to a decimal format is useful in many technical scenarios:

  • Storing IP addresses efficiently in databases
  • Performing fast IP range comparisons
  • Network scripting and automation
  • Firewall and access control configurations
  • Cybersecurity and log analysis

IPv4 Decimal vs Binary vs Hex

IPv4 addresses can also be represented in different formats such as binary and hexadecimal. While humans commonly use dotted-decimal notation, systems internally use binary or integer representations for faster processing.

This IPv4 to decimal converter helps you quickly switch between formats without manual calculations, saving time and reducing errors.

Whether you're a developer, network engineer, or security analyst, this tool provides a fast and reliable way to convert IP to decimal and understand how IP addressing works.