Skip to content

Privacy and personal data

How to design web apps, games and services that handle personal data: knowing what you hold and where it flows, collecting less, privacy-friendly defaults and consent, retention and deletion, users' requests, third parties, impact assessments and breaches. This is architecture guidance, not legal advice. The rules follow the EU and UK GDPR as the European Data Protection Board (EDPB), the European Commission and the UK Information Commissioner's Office (ICO) explain them; other laws may add requirements, so check what applies to you with your data protection officer or a lawyer. Security measures that protect personal data are in Security, including keeping personal data out of logs (SEC-4). Personal data in telemetry is covered by OTEL-12 in OpenTelemetry, sign-in by Authentication and sessions, backups by DATA-8 in Data, and app-store privacy declarations and children's games by MOBGAME-6 and MOBGAME-7 in Mobile games.

Entries are sorted by score from 1 to 10 (criteria): 9โ€“10 start here or strongly recommended, 6โ€“8 recommended, 1โ€“5 further reading or conditional.

Adopted references

  • 9 EDPB Guidelines 4/2019 on Article 25, Data protection by design and by default (European Data Protection Board, 2020): the baseline for designing processing: what each data protection principle requires of a system's design and default settings, with key design elements and examples for each.
  • 9 Regulation (EU) 2016/679, General Data Protection Regulation (GDPR) (EUR-Lex): the law itself, including the principles (Article 5), individuals' rights such as access, erasure and portability (Articles 15 to 22), data protection by design and by default (25), security (32), breach notification (33 and 34) and impact assessments (35). The UK GDPR uses the same article numbers.
  • 8 UK GDPR guidance and resources (ICO): detailed, practical guidance with checklists on every part of data protection law. Some pages are under review after the Data (Use and Access) Act 2025.
  • 8 Age appropriate design: a code of practice for online services (ICO Children's code): 15 standards for apps, games, connected toys and websites that children are likely to use.
  • 7 Information for business and organisations (European Commission): plain-language answers on the GDPR's principles, legal grounds, obligations and individuals' requests, with examples and links to the EDPB guidelines on each topic.
  • 7 Privacy in the product design lifecycle (ICO): what product managers, designers and engineers must, should and could do at each stage, from kick-off to post-launch.
  • 7 NIST Privacy Framework: a voluntary framework for identifying and managing privacy risk, independent of any one law. Version 1.0 is from 2020, and version 1.1 is in draft.
  • 7 LINDDUN (DistriNet, KU Leuven): privacy threat modelling, with seven threat categories (linking, identifying, non-repudiation, detecting, data disclosure, unawareness and non-compliance) and methods from a card-based team session to a systematic analysis of data flow diagrams. Use it alongside security threat modelling (SEC-3, SEC-9).

Key rules

Inventory and minimisation

  • 9 PRIV-1 Collect only the personal data that a feature needs for a purpose you have stated, and don't reuse it for a new purpose that isn't compatible with that one. Check whether less detailed, aggregated or no personal data would do, and don't make fields required unless the purpose needs them. (European Commission, Purpose limitation and Data minimisation, EDPB Guidelines 4/2019)
  • 8 PRIV-2 Keep an inventory of the personal data each system processes: what data, about whom, for which purpose and on which lawful basis, where it is stored, which services and third parties receive it, and how long it is kept. Update it in design reviews whenever a data flow changes, and use it to answer requests and assess breaches. (ICO, Documentation, NIST Privacy Framework 1.0, Inventory and Mapping (ID.IM-P))
  • 7 PRIV-3 Pseudonymise personal data that analytics and other secondary uses need to link but not to identify: replace direct identifiers with the output of a keyed one-way function or a random lookup table, and keep the key or table separate, with tighter access (SEC-2). A plain hash of an email address or player ID can be reversed by hashing candidate values, and pseudonymised data is still personal data. (EDPB Guidelines 01/2025 on Pseudonymisation (draft for consultation), EDPB Guidelines 4/2019)
  • 7 PRIV-4 Use made-up test data in development, test and demo environments, not copies of production personal data. If you can't avoid live data, approve and record its use, limit it to what the test needs, and protect the environment like production. (NIST SP 800-53 Rev. 5, SA-3(2) and PM-25)

Retention, deletion and users' requests

  • 8 PRIV-8 Set a retention period for each kind of personal data, including the copies in logs, backups, analytics and caches, and enforce it automatically: delete or anonymise the data when its period ends. Scheduled jobs or time-to-live settings are more reliable than manual clean-ups, and pseudonymised data is still subject to retention. (EDPB Guidelines 4/2019, Storage limitation, ICO, Storage limitation)
  • 8 PRIV-9 Design erasure so that one request removes a user's personal data everywhere it is kept: in every service and replica, search indexes, caches, analytics and data warehouses, and at the processors and other recipients you shared it with. Find the copies through the inventory (PRIV-2), have each service that owns a copy delete it (DATA-1), and put copies in backups beyond use until the backup schedule replaces them. (ICO, Right to erasure, European Commission, Dealing with requests from individuals)
  • 7 PRIV-10 Let users get a copy of their personal data, and download the data they gave you in a structured, commonly used, machine-readable format, such as JSON or CSV, preferably through a self-service tool. Accept requests electronically and answer them within one month. (ICO, Right to data portability, European Commission, Dealing with requests from individuals)

Third parties, risks and breaches

  • 8 PRIV-11 Before adding a third-party SDK or service that receives personal data, such as analytics, advertising, crash reporting or customer support, find out what it collects, switch off what you don't need, and add it to the inventory (PRIV-2). Have a written contract with every processor, and declare what the SDKs in an app collect in the app stores' forms (MOBGAME-6). (EDPB Guidelines 4/2019, ICO, Contracts)
  • 8 PRIV-12 Be able to detect a personal data breach and notify the supervisory authority within 72 hours of becoming aware of it, unless it is unlikely to put people at risk: alert on unusual access to personal data (SEC-4), keep a runbook that names who assesses and notifies, and require processors to report breaches to you. Record every breach, notified or not, and tell the affected people when the risk to them is high. (EDPB Guidelines 9/2022 on personal data breach notification, European Commission, Notifying data breaches)
  • 7 PRIV-13 Do a data protection impact assessment before building processing that is likely to be high risk, such as large-scale profiling, tracking people's location or behaviour, combining datasets, or offering online services directly to children, and update it as the design changes. Run it alongside the security threat model (SEC-3). (ICO, When do we need to do a DPIA?, European Commission, Data Protection Impact Assessment)
  • 7 PRIV-14 Know in which countries each service and processor stores or accesses personal data, and cover every transfer out of the EEA or the UK with an adequacy decision or appropriate safeguards, such as standard contractual clauses. (European Commission, Rules on international data transfers, ICO, A brief guide to international transfers)

How to enforce

Tools that check the key rules above automatically, in CI, the IDE or a commit hook. "Partly" means the tool covers only some of what the rule asks.

  • 5 Bearer CLI privacy report and third-party rules, such as Leakage of sensitive data to Sentry: a static analysis scanner that runs in CI. The report lists the personal data types the code processes and the third-party services they are sent to, and the rules flag sensitive data sent to logging, error-tracking and analytics services. Partly checks PRIV-2 and PRIV-11.
  • 5 Presidio: detects and anonymises personal data, such as names, locations, phone numbers and credit card numbers, in text, structured data and images. Script it in a pipeline to scan test fixtures, seed data and data exports for real personal data; detection is heuristic and misses some. Partly checks PRIV-4.
  • 4 Privado: open-source static analysis for Java and Python, run locally or in CI, that maps personal data from where the code collects it to third parties, databases, logs and APIs. Partly checks PRIV-2 and PRIV-11.

Tutorials and further reading

  • 6 Privacy Design Strategies (The Little Blue Book) (Jaap-Henk Hoepman, 2022): eight strategies for designing privacy into systems (minimise, separate, abstract, hide, inform, control, enforce and demonstrate) and the techniques that implement them.
  • 6 Data protection guide for small business (EDPB): practical guidance and tools on the basics, individuals' rights, compliance, security and data breaches.
  • 5 OWASP Top 10 Privacy Risks (2021): the most common privacy risks in web applications, such as operator-side data leakage, insufficient deletion and asking for consent to everything.