Defang URL

Takes a Universal Resource Locator (URL) and 'Defangs' it; meaning the URL becomes invalid, neutralising the risk of accidentally clicking on a malicious link.

Input: TextResult: Text

Text input

Run to see the result

Examples

Make two report links non-clickable in an incident note

Reserved example domains are used; these are not live threat indicators.

Input

https://example.org/login
http://sub.example.net/reset

Expected answer

hxxps[://]example[.]org/login
hxxp[://]sub[.]example[.]net/reset
Escape dots
On
Escape http
On
Escape ://
On
Process
Only full URLs
Defang hostnames while keeping an email address recognizable

Only dots are escaped; the @ sign remains.

Input

host: login.example.org
contact: analyst@example.net

Expected answer

host
login[.]example[.]org
contact
analyst@example[.]net
Escape dots
On
Escape http
Off
Escape ://
Off
Process
Valid domains and full URLs
Keep a bare domain unchanged when processing only full URLs

The processing scope matters: the bare domain is intentionally left as written.

Input

See example.org and https://example.net/path

Expected answer

See example.org and hxxps[://]example[.]net/path
Escape dots
On
Escape http
On
Escape ://
On
Process
Only full URLs
Escape only the scheme separator in a copied FTP address

Useful when a report convention retains dots and the original protocol name.

Input

ftp://archive.example.org/pub/data.csv

Expected answer

ftp[://]archive.example.org/pub/data.csv
Escape dots
Off
Escape http
Off
Escape ://
On
Process
Only full URLs
Apply a dots-only policy to an IPv4 indicator

192.0.2.0/24 is reserved for documentation, not a claimed malicious address.

Input

192.0.2.42

Expected answer

192[.]0[.]2[.]42
Escape dots
On
Escape http
Off
Escape ://
Off
Process
Everything
A documentation article

Prepare an inert-looking indicator for a report using reserved example domains. Defanging is display formatting, not a security boundary.

Input

https://docs.example.com/guide

Expected answer

hxxps://docs[.]example[.]com/guide
Escape dots
On
Escape http
On
Escape ://
Off
Process
Only full URLs
An encoded search query

Prepare an inert-looking indicator for a report using reserved example domains. Defanging is display formatting, not a security boundary.

Input

https://search.example.org/?q=coffee%20beans

Expected answer

hxxps://search[.]example[.]org/?q=coffee%20beans
Escape dots
On
Escape http
On
Escape ://
Off
Process
Only full URLs
A reserved HTTP test URL

Prepare an inert-looking indicator for a report using reserved example domains. Defanging is display formatting, not a security boundary.

Input

http://example.net/path?q=1

Expected answer

hxxp://example[.]net/path?q=1
Escape dots
On
Escape http
On
Escape ://
Off
Process
Only full URLs
A fragment-only navigation target

Prepare an inert-looking indicator for a report using reserved example domains. Defanging is display formatting, not a security boundary.

Input

https://example.com/page#section

Expected answer

hxxps://example[.]com/page#section
Escape dots
On
Escape http
On
Escape ://
Off
Process
Only full URLs

This is often used when dealing with malicious links or IOCs. Works well when combined with the 'Extract URLs' operation.

Format reference: Defang URL background and specification

Related tools

Browse networking tools