🪤Regex IP and Domain Extractor

Extract IPs and domains from text, then dedupe and classify

Extraction is done with regular expressions only. Domains cannot be told apart perfectly without a registered TLD list, so a name like file.txt looks exactly like a domain. That is why excluding common file extensions is an option, and an extension outside that list can still be picked up as a domain. In a string with five dot-separated numbers such as 1.2.3.4.5, only the first four octets match as IPv4. Validating a single address and computing CIDR ranges belong to other tools.

You Might Also Need

Pull just the IPs and domains out of a long text

Paste a log or configuration file as it is and the page finds IPv4 and IPv6 addresses along with domains, removes duplicates and sorts them. Each IP is labelled private, loopback, link-local, carrier grade NAT, multicast or public, and a copy-ready list with one entry per line is built underneath.

Classification uses the private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback (127.0.0.0/8), link-local (169.254.0.0/16), carrier grade NAT (100.64.0.0/10), the documentation ranges and multicast (224.0.0.0/4). For IPv6 it recognises loopback ::1, unspecified ::, unique local fc00::/7, link-local fe80::/10, multicast ff00::/8 and documentation 2001:db8::/32. Current as of October 2026.

Because extraction is regular expressions only, it has limits. Domains cannot be separated perfectly without a registered TLD list, so a name like file.txt has the same shape as one. Excluding common file extensions is therefore an option, and an extension outside that list can still be captured. Validating a single address, computing CIDR ranges and generating the regular expression itself are not supported.

Frequently Asked Questions

Why is domain extraction not perfect?

Without a registered TLD list, a regular expression cannot tell a name like file.txt apart from a domain by shape alone. Excluding common file extensions is offered as an option, and extensions outside that list can still be captured.

How are private and public IPs separated?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 count as private, and fc00::/7 as unique local for IPv6. Loopback, link-local, carrier grade NAT and multicast are labelled separately.

Does it validate a single address too?

No. This page only extracts and classifies. Validating one address and computing CIDR ranges are handled by separate calculators.