Obfuscate an email address on a website by encoding the visible address and its complete mailto target as decimal HTML character references; this can hide the literal address from basic source-text scrapers while keeping the link usable in ordinary browsers. This changes the source representation, not the underlying discoverability of a public address.

The Email Address Obfuscator creates the complete anchor locally in your browser. It normalizes the address, converts every code point in both the visible text and the href into a decimal numeric reference, and produces source with no literal address characters. Numeric character references are standard HTML parsing features, as explained in the WHATWG HTML character-reference rules. A browser decodes them when rendering the page, so visitors see the email address and can follow the link.

Treat the result as lightweight obfuscation rather than security. A modern crawler may decode the entities, inspect the DOM, or follow a mailto link. Visitors can also reveal the address through the rendered page, link copying, or developer tools. The tool makes no promise to reduce spam and is not access control or privacy protection.

obfuscate email address on website
How to Obfuscate an Email Address on a Website

What the encoded anchor changes

The generated output is one ordinary HTML anchor rather than a JavaScript routine. Both parts are encoded: the text people see and the complete mailto target, including its prefix and address. In simplified form, the lowercase letter “a” is written as the decimal reference a. Applying that representation to every code point keeps the generated snippet from containing the address as ordinary source text.

The distinction between source and rendering is central. A scraper that searches only for a conventional plaintext address pattern may miss the encoded value. A browser, or a crawler that understands HTML references, can reconstruct it. The same address can therefore be absent as plain source text while still being available to visitors and competent automated tools.

  • For people: The browser renders the decoded address as visible link text, and clicking it can open a configured email application.
  • For basic scrapers: A tool limited to literal address matching may overlook the encoded source.
  • For capable crawlers: Decoding references, inspecting the rendered DOM, or following the link can reveal the address.

Generate and publish the obfuscated anchor

  1. Choose a public contact address. Use an address that you intend to publish. Do not embed secret addresses, credentials, private aliases, or other information that must remain confidential.
  2. Enter the address and generate the anchor. Paste the public email address into the Email Address Obfuscator and generate its numeric-entity HTML anchor. Processing stays in the browser, and the output includes decimal references in both the visible address and the full mailto target.
  3. Copy the complete anchor. Copy the generated HTML in full rather than reconstructing only the visible text or the href. The complete output is the tested unit intended for publication.
  4. Paste it into an HTML source context. Place the anchor in a controlled HTML source template. Do not paste it into a rich-text editor that may render the entities immediately or rewrite them during formatting.
  5. Open the delivered page and inspect its source. Check the page produced by your actual template or CMS, not only the tool’s result. Confirm that the anchor still contains numeric references rather than literal address characters.
  6. Test the mailto link. Click the link once and confirm that the configured email application receives the intended address. The visible text and destination must both agree with the public address you entered.
  7. Use a protected form when resistance matters. If the purpose is meaningful abuse resistance rather than lightweight source obscurity, use a server-side contact form with validation, rate limiting, and appropriate spam controls instead of treating the encoded anchor as a spam-prevention system.

The copied snippet is an intermediate result, not proof of the published output. A template, CMS, or editor can alter entity references between generation and delivery, so verification must happen on the page visitors receive.

  • Inspect the source: Confirm that the generated anchor still uses numeric character references and has not been converted back into a literal address.
  • Check the rendering: The page should display the intended email address as normal link text rather than raw entity text.
  • Test the action: Click the link and verify that it opens the intended mailto destination without changing the local part or normalized domain.
  • Recheck after republishing: Repeat the source and link checks whenever the content passes through the CMS again, because a later save can introduce a transformation that was absent from the first version.

Source inspection and spam prevention are separate goals. Passing these checks confirms that the obfuscation survived publication and the link works; it does not establish that the address will resist modern scrapers.

Handle CMS and editor transformations

Two failure modes can make a copied anchor behave differently after publication. The first is decoding: if the CMS converts numeric references into literal characters, the address becomes plain source text again and the obfuscation is gone. The second is double-escaping: if the editor changes the ampersand, the source may contain a instead of a, and a visitor may see entity text rather than the intended character.

  • Use a source editor or template field when the CMS offers a controlled place for raw HTML.
  • Avoid a rich-text field for the encoded anchor because visual editing can render or rewrite the references.
  • Inspect the delivered source after saving instead of assuming the pasted snippet survived unchanged.
  • Correct the publishing context if needed so the browser receives decimal references rather than decoded characters or double-escaped text.

The tool deliberately uses decimal entities instead of JavaScript-dependent address assembly. That avoids introducing script-based injection that could fail when scripts are disabled or conflict with a content security policy. The simplicity also makes the encoding straightforward for capable crawlers to reverse, so it should be used only when lightweight source obscurity is an acceptable trade-off.

Know which addresses the tool accepts

The validator is intentionally narrower than the full email standards and is designed for ordinary public website contact addresses. Understanding its boundaries prevents valid but unsupported mailbox formats from being mistaken for a general-purpose email validation service.

  • Basic shape: The address is trimmed, then it must contain exactly one at sign, a nonempty local part, and a domain with multiple labels. Whitespace and control characters are not accepted.
  • Local-part rules: Leading, trailing, or consecutive dots in the local part are rejected. The local part retains its original case and supported punctuation.
  • Domain normalization: The domain is lowercased and passed through the browser’s URL host parser. An internationalized domain is serialized to its ASCII-compatible form so the output can be reproduced across browsers.
  • Excluded formats: Quoted local parts, comments, domain literals, IPv4 literals, single-label hosts, and unusual legacy forms are outside the supported subset.
  • No mailbox verification: The tool validates the address shape but does not determine whether the mailbox exists or can receive messages.

A rejected address may still use a mailbox syntax recognized by specialized systems; it simply falls outside this tool’s deliberately narrow public-contact contract.

Choose the right protection for the job

Compare the options by their actual purpose. An encoded mailto anchor is a source-obscurity measure, while a protected server-side form can provide stronger controls against abuse. A plain address is appropriate only when public visibility is the goal.

Approach Address handling Abuse resistance Best fit
Decimal-entity mailto anchor The generated source contains no literal address characters, but browsers display the decoded text. May deter basic plaintext matching; modern crawlers can still decode the anchor. A public clickable link when lightweight source obscurity is enough.
Protected server-side contact form Visitors submit a form rather than relying on a public mailto link. Can provide meaningful resistance when paired with validation, rate limiting, and appropriate spam controls. A contact route where abuse resistance is the priority.
Plaintext mailto link The address appears directly in the page source. Provides no source obfuscation. A public address that is intended to be visible and searchable.

Other practical defenses include a disposable role address, filtering rules, and mailbox-provider controls. For a focused comparison of lightweight obfuscation and a protected setup, see email obfuscator safety and protected-form setup.

Choose the encoded anchor when the visitor needs a direct, clickable public email link and source obscurity is a limited objective. Choose a protected contact form when controlling submissions and limiting abuse are the real requirements. In either case, validate the final public output rather than relying on the copied snippet alone.