How to Customize Privatiser Detection with Custom Words, Allowlists, and Regex

Updated

Privatiser's Settings panel gives you four levers to tune detection: Custom words to redact (always redacted, regardless of pattern), Allowlist (never redacted), Custom regex patterns (with a case-insensitive toggle), and Saved presets (save, load, delete, export, import). All of this runs locally in your browser — the site states "Local processing only — nothing leaves your machine," so your rules and the text they touch stay on your machine.

Where these controls live

Open the Settings tab (the tool has Try it / Anonymize / Deanonymize / Settings views). The relevant fields are:

Control Input format Effect
Custom words to redact Comma-separated Always redacted, regardless of pattern
Allowlist (never redact) Comma-separated These values will never be redacted
Custom regex patterns One pattern per entry, with a Case insensitive option Adds your own detection rules
Saved presets Save current / Load / Delete / Export all / Import Persist and move your configuration

Alongside these, the built-in Detection categories (Secrets & Keys, Network, PII, AWS Cloud, Generic Identifiers) and Pattern packs (Crypto, Kubernetes, Terraform, Comms, Location & Coordinates) stay on unless you turn them off — your custom rules layer on top of them.

Force-redact terms with Custom words

Use this when a value matters to you but no built-in pattern would catch it — internal project codenames, a hostname that doesn't match the Network rules, a customer name.

  1. Go to Settings.
  2. In Custom words to redact, enter the terms separated by commas, e.g. ProjectFalcon, acme-internal, ticket-4471.
  3. Return to Anonymize and paste your text.

Expected result: every listed term is replaced in the anonymized output and recorded in the mapping, so Deanonymize restores it. Because the rule is unconditional, a term here is redacted even if it would otherwise look harmless.

Stop false positives with the Allowlist

Use this when a pattern is over-matching something you need to keep readable — a public company name that trips the Names rule, a documentation IP like 192.0.2.1, a sample card number in a tutorial.

  1. In Settings, find Allowlist (never redact).
  2. Enter the values separated by commas.
  3. Re-run Anonymize on the same text.

Expected result: those values pass through untouched while everything else is still redacted. The allowlist wins over detection, so it's the right tool for "this looks sensitive but isn't."

A practical ordering note: if a value appears in both lists, treat the allowlist as your safety net and keep the two lists disjoint to avoid guessing which rule applies.

Add your own patterns with Custom regex

Use this for structured identifiers your organization uses that aren't in the built-in set — an internal ID format, a ticket prefix, a proprietary token shape.

  1. In Settings, open the Custom regex patterns area and choose the identifier type it belongs to (Identifiers, Secrets, PII, or Network) via Add pattern.
  2. Enter the regular expression.
  3. Enable Case insensitive if the format varies in casing.
  4. Test against a sample in Anonymize and confirm the match count and the mapping entry.

Expected result: matches are redacted like any built-in pattern and appear in the mapping JSON. Keep patterns anchored and specific — a loose expression will redact far more than intended, and the allowlist is your correction path if it does.

Save, reuse, and move your configuration

Once the rules fit your workflow:

  • Save current stores the configuration as a preset; Load reapplies it; Delete removes it.
  • Export all and Import move your full configuration between browsers or machines.

This matters because the tool is also available as a browser extension (Chrome, Firefox), a VS Code extension, and a Python package (pip install privatiser) — a preset you export from the web tool is the portable record of your rules.

Common snags

  • Comma-separated means commas are separators. A term containing a comma can't be entered as a single custom word this way.
  • Custom words are unconditional. If you add something to the redact list and later want it visible, remove it there rather than expecting the allowlist to override it.
  • Regex is the highest-risk control. Add one pattern at a time and verify the match count before adding the next.
  • Presets are your rollback. Save a known-good preset before experimenting with regex so you can reload it if detection goes wrong.

Quick decision guide

Goal Use
Redact a term no pattern catches Custom words to redact
Keep a value visible despite a matching pattern Allowlist
Detect a structured format unique to you Custom regex patterns (+ Case insensitive)
Reuse or transfer your setup Saved presets / Export all / Import