Skip to content
SubnettingCalculator
IPv4 Detecting…
IPv6 Detecting…

IP List Cleaner & Refanger – Extract IPv4 & IPv6 Addresses

Use this free IP list cleaner and refanger to pull IPv4 and IPv6 addresses out of any text, log or threat report. It fixes defanged addresses like 1[.]2[.]3[.]4, removes duplicates, sorts everything into one clean list and shows you which addresses were repeated. Handy for firewall blocklists and IOC lists.

IP List Cleaner

Paste your text or logs, choose what to do, and click Clean IPs.

Text or Logs

Options:

What is an IP list cleaner and refanger?

Logs, tickets, emails and threat reports are full of IP addresses, but they come mixed with timestamps, ports, usernames and other text. This tool reads all of it and gives you back only the addresses: one clean list with the IPv4 and IPv6 addresses together, and no duplicates. The addresses that appeared more than once are shown in a separate box.

It also refangs addresses. Analysts write them in a safe, "defanged" form like 185.220.101[.]34 so that they cannot be clicked by mistake. Before you can block or search for such an address, it has to be turned back into 185.220.101.34. The tool does that for you.

How to use the IP List Cleaner

1Paste your text

Paste anything into the box: firewall logs, web server logs, a threat report, an email or a plain list. Not sure how it works? Click Load Example Logs to fill the box with sample logs that include defanged IPs, IPv6 addresses and duplicates, and see the result straight away.

2Choose the options

Extract IPv4 and Extract IPv6 choose which kinds of address you get. Refang IPs fixes defanged addresses. Remove Duplicates keeps one copy of each address. Sort Numerically orders the lists by value. All five are on by default.

3Click Clean IPs

The clean list appears below, IPv4 addresses first and then IPv6, with the number of addresses found, duplicates removed and defanged addresses fixed. A second box under it shows which addresses appeared more than once, and how many times. After the first click, both boxes follow your changes, so you can tick or untick an option and watch them update.

4Copy or download

Both boxes have their own Copy and Download buttons. You get one address per line, in a plain text file. Clear All empties the input and puts the options back to their defaults.

What gets refanged

These defanged forms are turned back into normal addresses when Refang IPs is on:

Defanged formRefanged address
192[.]168[.]1[.]10192.168.1.10
192(.)168(.)1(.)10192.168.1.10
192{.}168{.}1{.}10192.168.1.10
192[dot]168[dot]1[dot]10192.168.1.10
192\.168\.1\.10192.168.1.10
2001[:]db8[::]12001:db8::1
2001(:)db8(::)12001:db8::1
2001[colon]db8[::]12001:db8::1

If you turn Refang IPs off, defanged addresses are left alone and will not appear in the results.

How the tool finds addresses

IPv4

  • Four numbers from 0 to 255, separated by dots.
  • Leading zeros are not accepted, so 10.01.2.3 is skipped. Some systems read it as octal, so the meaning is unclear.
  • Numbers with five parts, like 1.2.3.4.5, and versions like v1.2.3.4 are not addresses and are skipped.
  • A port or a prefix after the address is dropped: 203.0.113.45:8080 gives 203.0.113.45.

IPv6

  • Each candidate is checked with a strict parser. It needs 8 groups of 1 to 4 hex digits, or fewer groups with a single ::. An IPv4 ending such as ::ffff:192.0.2.77 is fine.
  • Times (03:12:44), MAC addresses (00:1a:2b:3c:4d:5e) and code such as std::vector do not pass the check, so they are not listed.
  • Brackets, ports and zone IDs are dropped: [2001:db8::1]:443 gives 2001:db8::1 and fe80::1%eth0 gives fe80::1.
  • Every address is written in the standard short form, so 2001:DB8:0:0:0:0:0:1 and 2001:db8::1 are seen as the same address and counted once.

Example

This text:

src=203.0.113.45 dst=10.0.0.5
blocked 198[.]51[.]100[.]23 and 203.0.113.45
client [2001:DB8:0:0:0:0:0:1]:443
beacon 2001[:]db8[::]1

gives this result, with Refang, Remove Duplicates and Sort all on. IPv4 addresses come first, then IPv6:

Clean IP Addresses (4)Duplicate Addresses (2)
10.0.0.5203.0.113.45 (2 times)
198.51.100.232001:db8::1 (2 times)
203.0.113.45
2001:db8::1

Two duplicates were removed (the second 203.0.113.45 and the second 2001:db8::1) and listed in the second box, and two defanged addresses were fixed.

When it helps

Use it to build a blocklist from a threat report, to list the sources that appear in a firewall or web log, to see which addresses show up more than once, to clean an IOC list before you load it into a SIEM, or to merge several lists into one. Because it runs in your browser, internal logs never leave your computer.

To check what network an address belongs to, use the IPv4 Subnet Calculator.

Frequently asked questions

What does "refang" mean?

Security teams often write IP addresses in a "defanged" form, such as 185.220.101[.]34, so that nobody clicks them or a mail filter does not turn them into links. Refanging puts the address back into its normal form, 185.220.101.34, so that you can use it in a firewall rule, a blocklist or a search.

Which defanged forms does it fix?

Dots written as [.], (.), {.}, [dot], (dot), {dot} or \., and colons written as [:], (:), {:}, [colon], [::], (::) or {::}. Square, round and curly brackets all work.

How does it find IPv6 addresses without false hits?

Every candidate is checked with a strict IPv6 parser. It must have 8 groups of up to 4 hex digits, or fewer groups with one ::, and it may end in an IPv4 part such as ::ffff:192.0.2.77. Times like 03:12:44, MAC addresses like 00:1a:2b:3c:4d:5e and code like std::vector do not pass, so they are left out.

Why did 2001:DB8:0:0:0:0:0:1 become 2001:db8::1?

IPv6 addresses are written in the standard short form: lowercase letters, no leading zeros, and the longest run of zero groups replaced by ::. This makes sure that different spellings of the same address are seen as duplicates.

What happens to ports, brackets and zone IDs?

They are dropped. 203.0.113.45:8080 gives 203.0.113.45, [2001:db8::1]:443 gives 2001:db8::1, and fe80::1%eth0 gives fe80::1. A prefix such as /24 is ignored as well, so 10.0.0.0/24 gives 10.0.0.0.

Why was an address like 10.01.2.3 or 999.1.1.1 skipped?

999 is not a valid octet because the largest is 255. 01 has a leading zero, and some systems read that as an octal number, so it is not clear what address was meant. Both are skipped rather than guessed.

Why was 1.2.3.4.5 not extracted?

A number with five parts is a version number or an OID, not an IPv4 address. The same goes for a version written as v1.2.3.4.

What is the difference between Remove Duplicates and Sort Numerically?

Remove Duplicates keeps the first copy of each address and drops the rest. The addresses that were repeated are listed in the Duplicate Addresses box. Sort Numerically orders addresses by their value, so 10.0.0.9 comes before 10.0.0.10. If you turn sorting off, the addresses stay in the order they first appear in your text.

Can I use it for a firewall blocklist?

Yes. Paste your source text, click Clean IPs, then use Copy or Download on the clean list. You get one address per line, IPv4 first and then IPv6, which most firewalls and blocklist tools accept. Check the list before you apply it, because the text may have held addresses you do not want to block.

Is there a limit on the size of the text?

No fixed limit. Everything runs in your browser, so very large files depend on your device. A few hundred thousand lines work fine on most computers.

Is anything I paste sent to your server?

No. The text is processed in your browser and stays on your device. That makes it safe to use with internal logs.