

Using the shortcode in the block editor.
Email Address Obfuscation is a lightweight plugin that adds the [obfuscate_email] and [obfuscate_phone] shortcodes. They encode the email address or phone number with the built-in WordPress function antispambot(): characters are randomly converted to HTML entities, so simple bots that scan the page source cannot read them. Browsers decode the entities, so visitors see the address or number as usual.
The plugin uses no JavaScript, stores no data and does not connect to any external service.
mailto: or tel: linkPlain-text email address
[obfuscate_email email="[email protected]"]
Clickable email address
[obfuscate_email email="[email protected]" link=true]
Clickable email address with CSS classes
[obfuscate_email email="[email protected]" link=true class="my-class another-class"]
Clickable email address with email subject
[obfuscate_email email='[email protected]?subject=My custom email subject' link=true]
The subject is added to the mailto: link only; the link text is the email address. Other mailto: parameters can be added the same way, separated by &, for example ?subject=Hello&body=Hi there.
Link with your own text
Without link=true, the shortcode outputs the email address including the subject as text, so you can use it inside your own link, for example in a Custom HTML block:
<a href="mailto:[obfuscate_email email='[email protected]?subject=Hello']">Write to us</a>
Plain-text phone number
[obfuscate_phone phone="+421 000 000 000"]
Clickable phone number
[obfuscate_phone phone="+421 000 000 000" link=true class="my-class"]
The number is displayed as written. The tel: link contains only the digits and the leading +, e.g. tel:+421000000000.
Link with your own text
Write the number without spaces when you use it inside your own link, for example in a Custom HTML block:
<a href="tel:[obfuscate_phone phone='+421000000000']">Call us</a>
email (required for [obfuscate_email]) – The email address, optionally followed by a query string such as ?subject=.... If the address is not valid, the shortcode outputs nothing.phone (required for [obfuscate_phone]) – The phone number: 3 to 15 digits, optionally starting with +, separated by spaces or - . / ( ). If the number is not valid, the shortcode outputs nothing.link (optional) – Set to true to output a clickable link. Without it, the address or number is output as plain text.class (optional) – Space-separated list of CSS classes for the link.