Tools / Guides / Defang URLs and IPs

How to defang URLs, IPs and domains for safe sharing

What defanging is, the common styles (hxxp, [.], [@]), when to defang and when not to, and how to defang or refang a whole list in one go.

Updated 2026-11-04 · 6 min read

Paste a malicious URL into a ticket, a chat or an email and three things can go wrong. Someone clicks it. The app turns it into a link and fetches it to build a preview, which can tip off the attacker that you're looking. Or your own mail filter blocks the message because it contains a known-bad link. Defanging stops all three by changing the indicator just enough that nothing treats it as a live address, while any analyst can still read it.

What defanging looks like

IndicatorLiveDefanged
URLhttps://login-update.example.com/verifyhxxps[://]login-update[.]example[.]com/verify
Domainlogin-update.example.comlogin-update[.]example[.]com
IPv4203.0.113.45203.0.113[.]45 or 203[.]0[.]113[.]45
Email[email protected]billing[@]example[.]com

The common conventions are:

Square brackets are the most widely understood. Whatever you pick, pick one style for the team. Mixed styles are harder to read and break the tools that refang them later.

What not to defang

Where to defang

Anywhere a human reads the indicator and software might act on it: tickets, chat channels, emails to clients, incident reports, shift handovers and slide decks. Link previews in Slack and Teams are the one people forget. The preview service fetches the URL from its own servers, so the attacker's logs show a visit seconds after you paste it.

Refanging: turning it back

When you need to look an indicator up or add it to a block list, you refang it: hxxps back to https, [.] back to a dot. Doing that by hand on a list of 50 is slow and error-prone, and a missed bracket means a lookup that silently returns nothing.

How to defang a whole list

$ioc = 'https://login-update.example.com/verify'
$ioc -replace '^http', 'hxxp' -replace '://', '[://]' -replace '\.', '[.]'

That simple version also brackets dots in the path and query string. That's fine for a ticket, but don't use it to build anything a tool will parse.

FAQ

Is a defanged URL completely safe to share?

It can't be clicked or previewed by accident, which is the point. Someone can still refang it and visit it on purpose, so treat the indicator itself as sensitive if it reveals a client's name or an internal system.

Should I defang IPs as well as URLs?

Yes, in anything people read. Many apps make IP addresses clickable, and a raw IP in an email can trip your own filters.

Why does my tool not find the indicators in a defanged report?

Many extractors only recognise one style. Use one that understands the common variants ([.], (.), [dot], hxxp), or refang the text first.