跳到正文
ipaddress.tr

IP 地址转换器

IPv4 或 IPv6 地址的所有表示形式。

压缩形式
2001:db8::8a2e:370:7334
范围
特殊用途 · Documentation
完整形式
2001:0db8:0000:0000:0000:8a2e:0370:7334
整数
42540766411282592856904136881884656436
十六进制
0x20010db80000000000008a2e03707334
反向 DNS 名称
4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa
二进制
0010000000000001:0000110110111000:0000000000000000:0000000000000000:0000000000000000:1000101000101110:0000001101110000:0111001100110100

此内容尚无中文(中国)版本。在发布译文之前以英语显示。

An IP address is just a number — 32 bits for IPv4, 128 bits for IPv6. The familiar dotted and colon notations are human-friendly ways of writing it. This converter shows the same address as an integer, in hexadecimal and in binary, plus the reverse DNS name used for PTR lookups (in-addr.arpa for IPv4, ip6.arpa for IPv6).

For IPv6 it also shows the expanded form (all 32 hex digits) and the canonical compressed form defined by RFC 5952: lowercase, leading zeros removed and the longest run of zero groups replaced with ::.

常见问题

How do I convert an IP address to an integer?

Multiply each IPv4 octet by its place value: a×256³ + b×256² + c×256 + d. For 192.168.1.1 that is 3232235777.

What is the canonical form of an IPv6 address?

RFC 5952: lowercase hex, no leading zeros in a group, and the longest run of two or more zero groups compressed to ::. If two runs are equally long, the first one is compressed.

Why do PTR names look reversed?

DNS delegates from right to left, so reverse zones list address parts in reverse order. That lets each network owner be delegated authority for its own block.