Skip to main content

IP Converter

Converts an IPv4 address between dotted decimal, a 32-bit integer, dotted octal, a single octal integer, binary, and hexadecimal notation. Any of the first four forms is accepted as input. A leading-zero octet in dotted input is read as decimal and flagged, because inet_aton and web browsers read 192.168.010.1 as 192.168.8.1.

Runs entirely in your browser

This tool sends nothing over the network. Everything you enter is processed on your device and never reaches our servers.

Networking
System Administration
Loading the tool
Reference

Documentation

An IP converter rewrites one IPv4 address in every notation that software uses for it. An IPv4 address is a 32-bit number, and dotted decimal is only a convention for writing it: four 8-bit octets, each 0 to 255, separated by periods. The same 32 bits can be stored as one unsigned integer from 0 to 4,294,967,295, written octet by octet in octal, binary, or hexadecimal, or written as a single octal number.

Four input forms are recognized. Dotted decimal has four octets of one to three digits, each no greater than 255. A decimal integer is a single number with no dots and no leading zero. Dotted octal has four octets that each start with 0 and use only the digits 0 to 7, so 0300 is 192. An octal integer is a single number that starts with 0, so 030052000401 is 192.168.1.1. Auto-detection tests those shapes in order: a single number with a leading zero is an octal integer, any other single number is a decimal integer, four leading-zero octets are dotted octal, and anything else with dots is dotted decimal. A format chosen explicitly skips detection. Input that does not fit the format is rejected rather than truncated, so a stray letter, an octet above 255, or an 8 in an octal value is reported as an error.

Dotted decimal A.B.C.D becomes the integer A x 16,777,216 + B x 65,536 + C x 256 + D, because each octet is worth 256 times the one to its right. Going back, the first octet is the integer shifted right by 24 bits, the second is the integer shifted right by 16 bits and masked to its lowest 8 bits, the third shifts by 8 bits and masks, and the fourth is the lowest 8 bits. Each octet then converts on its own: base 8 padded to four digits with a leading zero for dotted octal, base 2 padded to eight bits for binary, and base 16 padded to two digits for hexadecimal. The octal integer is the whole 32-bit value in base 8 with a leading 0.

Leading zeros are where notations disagree. Dotted input such as 192.168.010.1 is read here as decimal, so 010 is ten. The C library function inet_aton and the URL parser in web browsers read a leading-zero octet as octal, so the same text reaches 192.168.8.1, and an octet such as 09 makes them reject the address. Whenever dotted input contains a leading-zero octet, the results carry a note giving the reading those parsers would apply.

For 192.168.1.1 the integer is 192 x 16,777,216 + 168 x 65,536 + 1 x 256 + 1 = 3,221,225,472 + 11,010,048 + 256 + 1 = 3,232,235,777. In dotted octal the octets are 0300, 0250, 0001, and 0001 (192 = 3 x 64, and 168 = 2 x 64 + 5 x 8). In binary they are 11000000.10101000.00000001.00000001, and in hexadecimal C0.A8.01.01. Reading the 32 bits in groups of three from the right gives the single octal number 030052000401.

IP address conversion is relevant across networking, security analysis, software development, and education. Different tools and protocols expect addresses in different notations, which makes moving between them a frequent task.

  • Network Troubleshooting: Translate an IP address into its decimal integer form to compare against firewall rules, access control lists, or database columns that store addresses as 32-bit integers, such as values produced by the MySQL INET_ATON() function.
  • Security Analysis: Identify obfuscated addresses in logs or phishing links. A browser opens http://3232235777/ and http://030052000401/ as 192.168.1.1, so a link that looks like a long number can still point at a specific host, and converting it to dotted decimal reveals the destination.
  • System Administration: Verify subnet calculations from the binary representation of an address, confirming which bits fall within the network portion and which belong to the host portion.
  • Software Development: Convert between address formats when working with low-level socket APIs, database storage fields, or configuration files that require a specific notation, and check how a parser treats leading zeros before trusting its output.
  • Education: Study how IPv4 addressing works by converting familiar addresses and observing the equivalent values in every base. Tracing the octet-to-binary breakdown reinforces the 8-bit boundaries that subnet masks follow.
  • Penetration Testing: Prepare octal, decimal, or hexadecimal variants of an authorized target address to test how web application firewalls and URL parsers handle non-standard IP representations.
  • DNS and Server Configuration: Confirm that an address stored in a configuration file as a decimal integer maps to the expected dotted-decimal address before applying changes to production systems.
  • Documentation: Present IP addresses in multiple formats within technical reports or knowledge base articles, so readers can reference whichever notation suits their workflow.
Inputs, outputs, and what the IP Converter computes

What the IP Converter asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.

Inputs

  • IP Address (text input) · default: 192.168.1.1
  • Input Format · default: Auto-Detect

Controls

Convert · Reset

Example

For 192.168.1.1 the integer is 192 x 16,777,216 + 168 x 65,536 + 1 x 256 + 1 = 3,221,225,472 + 11,010,048 + 256 + 1 = 3,232,235,777.