Decimal to IPv4

Convert decimal to IPv4.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter a decimal integer and get the IPv4 address it represents, split into four octets. 3232235777 becomes 192.168.1.1. Numbers above 4,294,967,295 wrap around rather than showing an error.

How to use

1
Step 1
Enter the integer.
2
Step 2
Press Run.
3
Step 3
Copy the dotted address.

How it works

The number is treated as an unsigned 32-bit value, and each byte becomes one octet, highest byte first. The value is reduced modulo 2^32, so 4294967296 gives 0.0.0.0.

octet1 = n ÷ 256³ (whole part), then the remainder is divided by 256², 256 and 1

Worked example

A decimal IP

Input
3232235777
Output
192.168.1.1
Walkthrough
3232235777 in hex is C0A80101, which is the bytes 192, 168, 1 and 1.

Limitations

  • Out-of-range numbers wrap around silently instead of raising an error.
  • Whole numbers only.
  • IPv4 only.

Questions

How do I convert a decimal number to an IP address?
Enter the number and press Run.
What is the largest valid value?
4,294,967,295, which is 255.255.255.255.
What IP is 0?
0.0.0.0.
Can I convert an IP back to decimal?
Yes, use the IPv4 to decimal tool.

Features

  • Unsigned 32-bit
  • Four octets
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Learn Regular Expressions - Crash Course

    freeCodeCamp.org

    Regex primer for tester and explainer pages.

    Watch on YouTube
  • How base64 encoding works

    Andrew Schmelyun

    Mental model for Base64 encode/decode tools.

    Watch on YouTube
  • MDN Web Docs

    MDN

    Primary reference for web APIs these developer tools touch.

  • Base64

    MDN

    When Base64 is appropriate versus raw binary transfer.