IP Address Extractor |
How to Extract IP Addresses From Text
Paste any text (server logs, email headers, firewall output) and get every IPv4 and IPv6 address in it, de-duplicated or with counts, filtered and sorted. Nothing leaves your browser.
Paste the text and click Extract: addresses are found even inside brackets, after ports or next to punctuation. Each address is listed once, in its standard form (IPv6 compressed, lower case), with how many times it appears and its type, such as public, private or documentation.
Find the Top IPs in a Log
Switch to counts to see which addresses appear most, then group them by network.
- Counts with Most frequent lists the busiest addresses first: in an SSH log, those are usually the ones guessing passwords.
- By network groups addresses by /24 for IPv4 and /64 for IPv6. Attackers and crawlers often rotate addresses inside one network, and a single IPv6 home connection usually uses many addresses in one /64.
- Public only drops private, loopback, documentation and other non-routable addresses, which you can't report or block upstream.
- Look up networks sends the public addresses to our IP to ASN lookup, which groups them by operator and flags hosting and Tor networks.
What Counts as an IP Address Here
Valid IPv4 (no number above 255, not part of a longer number) and valid IPv6, including compressed forms.
| In the text | Result |
|---|---|
203.0.113.5:443, (203.0.113.5), 203.0.113.5. | 203.0.113.5 |
[2001:db8::5]:443 | 2001:db8::5 |
2001:db8::10 and 2001:db8::9 | Two different addresses, both kept whole |
fe80::1%eth0 | fe80::1%eth0 (link-local, zone kept) |
1.2.3.4.5, 1234.5.6.78, v1.2.3.4 | Not an address: part of a longer number or word |
256.1.1.1, 12:30:45, aa:bb:cc:dd:ee:ff | Not an address (number above 255, a time, a MAC address) |
010.0.0.1 | 10.0.0.1, flagged: some software reads leading zeros as octal (8.0.0.1) |
Extract IPs on the Command Line
grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}' file | sort | uniq -c | sort -rn (IPv4; IPv6 needs a stricter pattern).
# Top IPv4 addresses in a log
grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}' access.log | sort | uniq -c | sort -rn | head
The pattern is quick but loose: it accepts 999.1.1.1, and it takes the first four numbers of a version string like 1.2.3.4.5. IPv6 is harder with grep because of the compressed :: forms. This page applies the full rules, and it also handles IPv6.
How This Tool Works
| Item | Detail |
|---|---|
| Where it runs | In your browser; the text isn't sent anywhere. "Look up networks" sends only the public IPs found, to our IP to ASN lookup. |
| What's found | IPv4 in dotted decimal and IPv6 in every standard text form, including ::, a dotted IPv4 tail, brackets, ports and zones. Each address is checked, not just matched by a pattern. |
| Types | From the IANA special-purpose address registries: private, loopback, link-local, documentation, multicast and others. |
| Size | Megabytes of text are fine; the table shows up to 500 rows, the text box has everything. |
| Stored | Nothing. |
| Last verified | 10 November 2026 |
Frequently Asked Questions
How do I extract IP addresses from a log file?
Does it find IPv6 addresses too?
Is my text sent to your server?
Next steps