Extract IP address

Scan pasted network text for bounded IPv4 octets and common full, compressed, or IPv4-embedded IPv6 spellings.

freeworks offlinenothing uploaded
ToolIP Address Extractor
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The dotted-decimal pattern restricts each of four octets to 0–255, and the colon pattern recognizes RFC 4291 full and compressed forms. IPv6 text is lowercased and exact spellings are deduplicated by default, but no DNS, allocation, reachability, or RFC 5952 canonicalization check runs.

  • Both address families and unique output are enabled because modern diagnostic logs commonly mix repeated IPv4 and IPv6 peers.
  • IPv4 spelling is retained while hexadecimal A–F is normalized to lowercase.

Worked example

Extract IPs from logs
Find IP addresses in server log entries
Input
											Connection from 192.168.1.1 refused. Retry from 10.0.0.5 succeeded.
										
Output
												IPs: 192.168.1.1, 10.0.0.5
IPv4: 192.168.1.1, 10.0.0.5
IPv6: none
Count: 2
Unique: 192.168.1.1, 10.0.0.5
											

When to use this

Web-server reviews collect client literals, firewall incidents inventory peers, and migration reports separate dotted IPv4 from colon-delimited IPv6.

Edge cases

  • 999.1.1.1 is omitted because its first IPv4 octet exceeds 255.
  • fe80::1%eth0 matches only the address portion because the zone identifier is not part of RFC 4291 address text.
  • 2001:db8::1 and 2001:0db8::1 remain separate strings although they denote the same address.

References