Redact sensitive data
Redact Sensitive Data (with Custom HTML Attribute and Regex Patterns)
BetterBugs.io enables you to prevent sensitive information from being captured or shared while creating bug reports with screenshots, screen recordings, or Rewind sessions.
You can configure BetterBugs.io to do this in multiple ways. For this, you have the following options
Custom HTML Attribute for Blurring Information — Adding
data-betterbugs=”ignore”
to your web page HTML element blurs out those elements before taking screenshots or recording screens or when using Rewind.Redact Data with Regex Patterns — Adding default or custom regex patterns first globally identifies the defined key/value pairs in the technical information getting captured (while creating bug reports). Then, the corresponding values get redacted and replaced with
“[*** REDACTED BY BETTERBUGS FOR PRIVACY ***]”
from your bug reports.
Custom HTML Attribute for Blurring Information
Before creating a report, you need to add the data-betterbugs=”ignore”
HTML attribute to your application web page(s) elements to exclude them from getting captured.
You can use this to blur out DOM elements. This means adding the attribute to the DOM elements would prevent them from getting recorded.
Using data-betterbugs=”ignore”
HTML attribute in your source code
data-betterbugs=”ignore”
HTML attribute in your source codeTo use the feature, just add the attribute in your HTML source code for selecting the desired element(s) to be ignored during screenshots, screen recordings, or Rewind sessions.
Here’s what it looks like:

You're good to go.
Redact Data with Regex Patterns
You can easily add regular expressions (REGEX) to BetterBugs.io for it to redact/remove sensitive data or prevent information from getting captured.
How It Works
Once you add the specific regex (from the extension’s “⚙️Settings” option), when you create a report, BetterBugs.io stringifies the technical details captured during the screen capturing (screenshot, screen record, or Rewind) session object and processes it with the saved regex patterns before the report uploads.
This prevents the pre-defined sensitive information, such as authentication headers, access tokens, emails, passwords, card numbers, CVV, and API keys, from being accidentally shared along with the bug reports.
For instance, if a network request (being captured) in your bug report contains a sensitive user email ID, with the pre-applied regex pattern, BetterBugs.io redacts it automatically while getting shared.
This means instead of the actual email ID for the key/pair value in the request/response/payload object, BetterBugs.io replaces it with “[*** REDACTED BY BETTERBUGS FOR PRIVACY ***]”
as the value in the result object.
EXAMPLE
Original JSON Object before capturing:
Redacted JSON result with the pre-applied REGEX after capturing:
Use Cases: Redact Data with Regex
Here’s how it’s commonly used:
Data Privacy Management — You can define multiple regex patterns in the settings to redact sensitive data before uploading. BetterBugs.io comes with predefined regex patterns for common sensitive data types like authentication headers, access tokens, emails, passwords, card numbers, CVV, and API keys. You can view unredacted data before uploading and verify redaction after uploading sensitive data.
Customizable Redaction — You can modify the regex patterns to fit your application's specific requirements. Redaction is applied only to sensitive data, and other intentionally added data remains unaltered.
Pre-added regex patterns that come with BetterBugs.io
By default, BetterBugs.io comes bundled with several pre-added regex patterns that you might commonly use. This helps you get started with using the redaction feature right off the bat.
To access the pre-added regex patterns:

Here, you’ll find all the pre-defined regex patterns that come as a default when you download BetterBugs.io
You can also add custom regex patterns from the BetterBugs user interface as required for your project.
Steps to Add Custom Regex Patterns
Adding custom regex patterns is super easy. Here’s how to do it:

You're good to go.
List of Data Points Redacted by Default (pre-defined by BetterBugs.io)
Password
Regex
This regex looks for the keywords password, passwd, or pwd, optionally enclosed in quotes (", ', or `), followed by an assignment operator (= or :), and captures the text representing the password inside quotes.
API Key
Regex
This regex matches API keys or similar tokens assigned to terms like api_key, access_token, or client_secret. The key must be alphanumeric, optionally include _, -, or ., and be 16–64 characters long.
Credit Card
Regex
Matches valid credit card numbers from providers like Visa, Mastercard, Amex, Discover, etc., while excluding invalid numbers (e.g., 0000000000000000). It recognizes formats with spaces or dashes.
CVV
Regex
Identifies 3–4 digit CVV codes assigned to terms like cvv, cvc, or cid, ensuring the code isn’t 000 or 999.
Email
Regex
Matches standard email addresses, allowing for +, %, or dots in local parts of the address.
Authorization Header
Regex
Captures Bearer tokens from Authorization headers. These tokens must follow the JSON Web Token (JWT) structure with three dot-separated Base64-encoded segments.
JWT Token
Regex
Matches JSON Web Tokens (JWT), which have three segments separated by dots. Each segment is Base64-encoded.
Client ID
Regex
Extracts client_id values that are 32+ alphanumeric characters long, assigned to terms like client_id or clientId.
IPv6
Regex
Matches valid IPv6 addresses, which are represented in hexadecimal and separated by colons.
IPv4
Regex
Matches valid IPv4 addresses, ensuring they are not browser version strings (e.g., Chrome/98.0.0.0).
Last updated
Was this helpful?