Using Firefox Relay to Generate Email Masks in Browser Forms

This article explains how the Firefox Relay integration works within the Firefox web browser to protect user privacy by generating disposable email masks directly inside online forms. It covers the initial account synchronization, how the browser automatically detects email fields, the one-click generation of aliases, and how the system manages these masks in the background to keep your real inbox secure.

Native Browser Integration and Setup

Firefox Relay works through either an official browser extension or the native integration built directly into modern versions of the Firefox browser. To use this feature, a user must be signed into their Mozilla account within the browser. Once signed in, Firefox automatically links the browser's autofill capabilities with the user's Firefox Relay service, requiring no manual copying and pasting of email addresses from a separate dashboard.

Automatic Form Detection

As you browse the web, Firefox actively scans the code of the webpages you visit—specifically looking at the Document Object Model (DOM) for form fields designed to accept email addresses. When the browser detects an <input> field configured for an email (such as during a newsletter sign-up, account registration, or checkout process), it automatically injects a small Firefox Relay icon directly inside the right side of that text box.

One-Click Mask Generation

Generating a disposable email address happens entirely within the form field through the following steps:

  1. Click the Icon: When you click on the email input field or the Relay icon inside it, a small pop-up menu appears directly below the text box.
  2. Request a Mask: The menu presents an option to "Use email mask." If you have available masks in your account, clicking this button triggers the generation process.
  3. API Communication: In the background, the Firefox browser sends a secure request to the Firefox Relay servers via an Application Programming Interface (API).
  4. Instant Autofill: The server instantly generates a unique, random alphanumeric email address (typically ending in @mozmail.com), links it to your real email address, and sends it back to the browser. Firefox then automatically populates the form field with this new mask.

Automatic Labeling and Management

When you generate a mask directly inside a form, the Firefox integration does more than just fill in the blank. The browser captures the domain name of the website you are currently visiting and sends that metadata to your Firefox Relay dashboard.

This automatically labels the newly created mask with the website's name. If that specific website ever sells your data or suffers a security breach, you will immediately know which site is responsible based on the label attached to the mask receiving the spam. From the dashboard, you can then block promotional emails or entirely deactivate the specific mask without affecting your real email address.