Skip to content
LookupOwl

IP address to decimal converter

Decimal, hex, binary and integer forms of any IP address.

One per line to convert several. A whole number works too.

Why an IP address is also a number

An IPv4 address is a 32-bit number written as four bytes. 192.168.1.1 is 192 * 256^3 + 168 * 256^2 + 1 * 256 + 1, which is 3,232,235,777. IPv6 is the same idea with 128 bits. Databases and firewalls often store addresses as integers because numbers are compact, sort properly and are quick to compare against a range.

Form192.168.1.1
Dotted decimal192.168.1.1
Unsigned integer3232235777
Hexadecimal0xc0a80101
Hexadecimal, dotted0xc0.0xa8.0x01.0x01
Binary11000000.10101000.00000001.00000001
Signed 32-bit integer-1062731519

How to use it

  1. Enter addresses or numbersOne per line, up to 500 (commas and spaces work too). You can use dotted IPv4, IPv6 in any notation, decimal integers (3232235777), hex with a 0x prefix (0xc0a80101) and binary with a 0b prefix (0b11000000101010000000000100000001).
  2. Read every formEach address shows its integer, hex and binary forms and what kind of address it is, such as private or public. IPv4 also gets the signed 32-bit number that a plain INT column would hold.
  3. Go the other wayPaste a number to get the address it stands for. The result notes which notation it read, so you can check it took your number the way you meant.

Where the number is used

  • Databases. MySQL's INET_ATON() and INET_NTOA() convert between text and integers, and PostgreSQL has a native inet type. A signed 32-bit INT cannot hold addresses above 127.255.255.255 as positive numbers, so use INT UNSIGNED or BIGINT.
  • Range checks. An address is inside a block when its integer lies between the block's first and last integers, which makes a fast BETWEEN query. The CIDR to range converter gives you both numbers.
  • Geolocation and ASN data. Some datasets ship as start and end integers.
  • Log analysis. Sorting numerically puts 10.0.0.2 before 10.0.0.10, which text sorting does not.
  • IPv6. The integer can have up to 39 digits, so store it as DECIMAL(39,0) or BINARY(16), or in a native type, not in a 64-bit integer.

Common problems

  • Leading zeros. 010.001.002.003 is ambiguous, because some software reads a leading zero as octal. The tool rejects it and shows both readings instead of guessing.
  • IPv4 or IPv6? A decimal number up to 4,294,967,295 is read as IPv4. Hex with up to 8 digits and binary with up to 32 bits count as IPv4 too. Anything longer is read as IPv6, up to 340,282,366,920,938,463,463,374,607,431,768,211,455 (2^128 - 1), and a bigger number is rejected. A zero-padded 0x000000001 is 9 digits, so it comes out as ::1.
  • Negative numbers. Some databases store an address as a signed 32-bit number, so it can come out negative. Add 4,294,967,296 to get the unsigned integer and paste that here. The negative value itself is not accepted.
  • Byte order. Network byte order is big-endian, which means the most significant byte comes first. A few systems and some hex dumps show the bytes reversed, so 0x0101a8c0 is 192.168.1.1 read little-endian.
  • Short forms. 127.1 works in some programs but is not standard, and is not accepted here.
  • Networks. A block with a prefix, like 10.0.0.0/8, is not converted here. Use the CIDR to range converter or the subnet calculator.

How it works

Each address is parsed strictly and held as a BigInt, so even 128-bit numbers are exact. IPv4 addresses are 32 bits long (RFC 791) and IPv6 addresses 128 bits (RFC 4291). The conversion is plain arithmetic, done on our server with no network lookup. To pull the IPv4 out of an IPv6 address, or the reverse, use IPv6 to IPv4 and IPv4 to IPv6. For subnet maths on the same numbers use the subnet calculator.

Questions people ask

How do I convert an IP address to a decimal number?

Multiply each of the four parts by 256 raised to its position, then add the results. The first part counts 256^3, the second 256^2, the third 256 and the last counts as it is, so 10.0.0.1 is 10 * 16,777,216 + 1 = 167,772,161. Or paste the address above and read the integer.

What is 192.168.1.1 in decimal?

It is 3232235777, which is 0xc0a80101 in hexadecimal and 11000000.10101000.00000001.00000001 in binary. As a signed 32-bit number it is -1062731519. The address is in a private range, so it only means something inside a home or office network, never on the public internet.

Why is the signed value negative?

A signed 32-bit integer stores numbers from -2,147,483,648 to 2,147,483,647. Addresses above 127.255.255.255 do not fit in that range, so code that wraps them around turns them into negative numbers. That can surprise you in a database column, and an unsigned column avoids it.

Can I convert a decimal number back to an IP address?

Yes. Paste the number and you get the address it stands for. A decimal number, a hex number with a 0x prefix or a binary number with a 0b prefix all work, and the result notes which one it read. Whether the answer is an IPv4 or an IPv6 address depends on the size of the number, as the common problems above explain.

Does it support IPv6?

Yes. An IPv6 address converts to a 128-bit integer of up to 39 digits, plus its hex and binary forms and its address type. The signed 32-bit value is IPv4 only, because it has no meaning for a 128-bit number.

Can I convert a whole list at once?

Yes, up to 500 addresses or numbers at a time, one per line. Each line gets its own result, so a typo on one line shows an error for that line only and the rest still convert. Anything past 500 is left out, and the JSON result shows truncated: true.

Are my addresses uploaded anywhere?

Yes, to our server, because the conversion runs there, on the web page as well as through the API or an AI assistant. The addresses are not written to our logs and are held in memory for at most a day. On the website, Google Analytics also records what you enter. The privacy policy has the details.

Use it from AI, the API or the command line

Every LookupOwl tool is also a free API and an MCP tool, with no key and no account. This one is ip_convert. Please be kind to the rate limits.

curl
curl "https://lookupowl.com/api/v1/tools/ip-convert?q=192.168.1.1"
MCP
claude mcp add --transport http lookupowl https://lookupowl.com/mcp