Create advanced Works with: Any AI

Data Anonymization Script

Decision tree

Remove or mask personal data for analysis or testing.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

Remove or mask personal data for analysis or testing. This is a technical aid; anonymization claims need expert and legal verification for [JURISDICTION]. Data fields and sample (fake) rows: [FIELDS_AND_SAMPLE]. Purpose of the output (analysis, test environment, sharing with a partner): [PURPOSE]. Language and tools: [LANGUAGE_AND_TOOLS].

Take each field through the tree:
1. Is the field needed for the purpose? IF not THEN drop it.
2. Is it a direct identifier (name, email, phone, ID numbers, account numbers)? IF yes THEN remove, or replace with a keyed hash or random token (keep the key outside the dataset). Use tokens only if joins across tables are needed.
3. Is it a quasi-identifier (date of birth, postal code, job title, rare attributes) that could identify someone in combination? IF yes THEN generalize (age bands, region instead of address, month instead of date) or suppress rare values.
4. Is it free text? IF yes THEN scrub patterns (emails, phone numbers, names) and consider removing the field.
5. Are numeric values sensitive? Consider noise or rounding where precision is not needed.
6. Check the result: count unique combinations of quasi-identifiers, aim for groups of at least k records (choose k), and try to re-identify a few records.

Deliver the script, a configuration file listing each field's treatment, a test that fails if forbidden patterns remain, documentation, and a note that pseudonymized data is usually still personal data.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts