loot.tools

IP Address Converter

Turn an IPv4 address into every other way of writing it. Enter it dotted (192.168.1.1), as a 32-bit integer (3232235777), in hex (0xC0A80101), or in binary, and get the decimal integer, full and per-octet hex, octal, binary, and the IPv6-mapped (::ffff:c0a8:101) and 6to4 forms back. Handy for firewall rules, log parsing, database lookups where IPs are stored as integers, and anywhere a tool wants a different notation than you have.

Convert an IPv4 address between its dotted form, a plain 32-bit integer, hex, octal, and binary, plus the IPv6-mapped and 6to4 forms. Type an address any of those ways - dotted, a decimal integer, 0x hex, or 0b binary - and every other representation updates as you go.

Dotted decimal
192.168.1.1
Decimal (integer)
3232235777
Hex
0xC0A80101
Hex (dotted)
C0.A8.01.01
Octal (dotted)
0300.0250.0001.0001
Binary
11000000.10101000.00000001.00000001
IPv6-mapped
::ffff:c0a8:101
IPv6-mapped (dotted)
::ffff:192.168.1.1
IPv6 expanded
0000:0000:0000:0000:0000:ffff:c0a8:0101
6to4 prefix
2002:c0a8:101::

Why convert an IP at all

Databases and APIs often store an IPv4 address as a single 32-bit integer because it sorts and range-queries faster than a string. Firewalls and ACLs sometimes want hex or binary. And an IPv4 address shows up inside IPv6 as a mapped or 6to4 address. This tool moves between all of those without you reaching for a calculator.

What you can paste in

It reads four forms: a normal dotted address (192.168.1.1), a plain decimal integer (3232235777), hex with a 0x prefix (0xC0A80101), and binary with a 0b prefix. Whatever you give it, the full set of representations updates live and every row has a copy button.

The IPv6 forms it shows

  • ::ffff:c0a8:101 is the compressed IPv4-mapped IPv6 address, ::ffff:192.168.1.1 keeps the familiar dotted tail, the expanded form spells out all eight groups, and 2002:c0a8:101:: is the 6to4 prefix
  • All the math runs in your browser, so nothing you type leaves your machine