# IP Address Format Converter

- **URL:** https://codeasystem.com/calculators/developer/ip-converter/
- **Category:** developer
- **Description:** Convert an IPv4 dotted-quad address between binary, hexadecimal, octal and 32-bit integer representations instantly.
- **Primary output:** Binary representation: 11000000.10101000.00000001.00000001

## Inputs
- IPv4 address (name: `ip`, type: text, example: 192.168.1.1)
- Show as (name: `format`, type: select)

## Outputs
- Binary representation: 11000000.10101000.00000001.00000001
- Dotted decimal (input): 192.168.1.1
- Binary: 11000000.10101000.00000001.00000001
- Hexadecimal: C0.A8.01.01
- Octal (per octet): 300.250.001.001
- 32-bit unsigned integer: 3,232,235,777

## Formula / methodology
```
int = o₁·2²⁴ + o₂·2¹⁶ + o₃·2⁸ + o₄
```

Each octet contributes eight bits. The converter packs them into one unsigned 32-bit integer, renders that integer in your chosen base, and shows every other representation as cross-check rows so conversions verify themselves.

## Assumptions & limitations
- Input must be strict dotted decimal with octets 0–255.
- Hex output uses uppercase pairs; octal pads each octet to three digits.

## How to use
1. **Enter the address**; Standard dotted quad, e.g. 10.0.0.1.
2. **Pick a representation**; Binary for teaching, hex for packet dumps, integer for databases that store IPs as numbers.

## Example
192.168.1.1 packs to integer 3232235777, binary 11000000.10101000.00000001.00000001 and hex C0.A8.01.01.

Result for these inputs:

```
Binary representation: 11000000.10101000.00000001.00000001
```

## About this calculator
### Where each format appears

Integer form shows up in IP geolocation CSVs and database columns; hex appears in Wireshark and protocol documentation; binary is how netmasks actually behave. Translating between them makes subnet math and packet analysis far less opaque.

### Unsigned 32-bit range

The packed integer spans 0 (0.0.0.0) to 4,294,967,295 (255.255.255.255). Sorting or comparing IPs numerically works correctly only once they are converted to this form.

## FAQs
### Why store IPs as integers?

They sort correctly, index compactly and compare cheaply. Most databases offer inet helpers over either representation.

### Is 192.168.001.001 valid input?

Leading zeros are accepted by some tools but rejected here; enter plain decimal octets from 0–255 to avoid ambiguity.

### Does this handle IPv6?

Not currently; IPv6 needs 128-bit packing and its own notation rules.

## Related calculators
- [Subnet & CIDR Calculator](https://codeasystem.com/calculators/developer/subnet-cidr-calculator/)
- [Port Number Lookup](https://codeasystem.com/calculators/developer/port-number-lookup/)
- [Data Storage Converter](https://codeasystem.com/calculators/conversion/data-storage-converter/)

---
Last updated: 2026-08-23 · Version: 1.0.0 · [HTML version](https://codeasystem.com/calculators/developer/ip-converter/)
