Blog

Pseudonymizing PDF contracts: GDPR guide for lawyers and DPOs

Decorative title card illustration with legal and data security motifs

Yes, pseudonymizing PDF contracts is GDPR-compliant, provided three non-negotiable conditions are met: apply a controlled pseudonymization technique (deterministic or random, depending on the use case), store the lookup table in a strictly separate environment, and document the technical and organizational measures in place. Without these safeguards, processing remains vulnerable to re-identification and fails to meet the requirements of Articles 25 and 32 of the GDPR.

The two most common use cases for this approach:

  • Sharing with AI or external service providers: submit an employment contract or NDA to ChatGPT, Claude, or an audit firm without exposing the names, national IDs, IBANs, or contact details of the parties.
  • Audits and benchmarking: transmit supplier contracts to a third party for comparative analysis while preserving the confidentiality of contracting parties.

Pro tip: Before any pseudonymization, classify your contracts by sensitivity level (health data, financial data, HR data)-this determines the technique to apply and the level of access control required for the mapping.


Key points

Pseudonymization of PDF contracts is GDPR-compliant if the lookup table is separated, encrypted, and subject to strict access control, and if the technical and organizational measures are documented.

PointDetails
Pseudonymization ≠ anonymizationPseudonymized data remains personal data: the GDPR applies in full, as confirmed by the CNIL and EDPB.
Mandatory separation of mappingThe lookup table must be stored separately from the corpus, encrypted, and accessible only to authorized operators.
Human validation essentialQuality control on a sample is necessary before any distribution: NER and regex produce false negatives.
Choose the technique based on use caseTokenization or AES encryption for structured identifiers; RNG for final exports without re-identification.
Safe-doc: zero storage, native auditSafe-doc processes PDF contracts in stateless mode and generates a PDF audit report after each processing.

Table of contents

When should you pseudonymize your PDF contracts?

Pseudonymization is not a universal solution. It is required in specific situations where processing involves disclosure to a third party or secondary use of data.

  • Transmission to a generative AI: any contract submitted to a tool like ChatGPT or Claude must be pseudonymized beforehand, as detailed in the guide on contract confidentiality and artificial intelligence.
  • Data room and due diligence: during a business sale, contracts shared with potential acquirers must mask the identities of employees or subcontractors.
  • Internal model training: train a classification model on real contracts without exposing the personal data of the parties.
  • Disciplinary or arbitration proceedings: transmit contractual documents to a third-party arbitrator while masking identities not relevant to the analysis.
  • Legal benchmarking: compare contractual clauses between entities of the same group without cross-referencing the personal data of contracting parties.

The risk level varies: transmission to an external AI should be treated as high priority, data rooms also as high priority, internal training as medium priority, and internal benchmarking as low priority if the scope remains controlled.

Pro tip: For lawyers, pseudonymization before sending to an AI is not only a GDPR best practice-it is a professional ethics obligation linked to [attorney-client privilege](https://safe-doc.ai/blog/avocats-chatgpt-secret-professionnel.html). The CNB (French National Bar Council) has emphasized that any sharing of client data with an unauthorized third party constitutes a potential violation.


What exactly does "pseudonymization" mean under GDPR, EDPB, and CNIL law?

The definition of Article 4(5) and its implications

The GDPR defines pseudonymization in Article 4(5) as the processing of personal data in such a manner that the data can no longer be attributed to a specific data subject without the use of additional information, provided that such additional information is kept separately and is subject to technical and organizational measures. Critical point: pseudonymized data remains personal data. The data controller remains subject to all GDPR obligations.

The EDPB Guidelines 01/2025 clarify that pseudonymization may constitute a supplementary measure for international transfers, provided that contractual and technical safeguards strictly limit access to the pseudonym and the lookup table. The concept of "pseudonymization domain" is central: protection is effective only if the recipient cannot, in their context, reconstruct the real identity.

The CNIL emphasizes this point: pseudonymization does not exempt an organization from risk analysis, a valid legal basis, or the implementation of technical and organizational measures within the meaning of Articles 25 (data protection by design) and 32 (security of processing). For lawyers, attorney-client privilege adds an additional constraint, making local or stateless solutions particularly suitable.

The distinction from anonymization is legally critical: anonymized data falls outside the scope of the GDPR, while pseudonymized data never does. Consulting Safe-doc's comparative page on pseudonymization and anonymization clarifies this point before any processing decision.


Article 4(5) definition and its implications - overview diagram

How to pseudonymize a PDF contract step by step

Operational workflow for native and scanned PDFs

The process consists of seven sequential steps. Each step conditions the next: incomplete upstream detection compromises the entire processing.

1. Prepare the corpus: inventory the contracts to be processed, classify them by type (employment, supplier, NDA, service), and identify the categories of PII present (names, company IDs, IBANs, national IDs, addresses, dates of birth).

2. Extract text: for a native PDF, use a direct extraction tool (pdftotext, PyMuPDF). For a scanned PDF, apply an OCR engine (Tesseract, AWS Textract) page by page before detection. OCR quality directly determines the PII detection rate.

3. Detect PII: combine named entity recognition (NER) for names and organizations, regular expressions for structured identifiers (national IDs, IBANs, company IDs, contract numbers), and checksums for financial data. A single engine is insufficient.

4. Choose the pseudonymization policy: deterministic if you must maintain consistency across multiple documents (same pseudonym for the same entity throughout the corpus); random if non-linkability takes precedence over analytical utility. ENISA recommends aligning this choice with the protection/utility tradeoff.

5. Apply and replace: substitute each detected PII with its pseudonym, preserving the syntactic structure of the contract (approximate length, grammatical gender, consistency of cross-references within the document).

6. Human quality control: review a representative sample (at least 10% of the corpus or the first 5 pages of each contract). Verify the absence of residual PII, the consistency of pseudonyms, and the integrity of essential contractual clauses.

7. Export and secure storage of the mapping: export the lookup table to an encrypted environment, separate from the pseudonymized corpus. Record the date, operator, tool version, and applied settings in an audit log.

Checklist before distribution

Before transmitting a pseudonymized contract, systematically verify:

  • PDF file metadata (author, title, revision history): purge using a dedicated tool.
  • Embedded annotations and comments: often overlooked, they may contain names or direct references.
  • Electronic signatures: they can reveal the identity of signatories via embedded certificates. Explicitly decide whether to retain or remove them based on the use case.
  • Scanned images and stamps: a company stamp or scanned handwritten signature is not processed by a text-based NER engine.
  • Hidden PDF form fields: some PDFs contain data in fields invisible on display but readable through extraction.

Pro tip: Always test your pipeline on a sample of 3-5 representative contracts before running a batch process. A false-negative NER on a specific type of clause (e.g., non-compete clause with names embedded in text) can go unnoticed at scale.

For batch processing, maintain a single lookup table per corpus to ensure cross-document consistency: the same individual must receive the same pseudonym in all contracts in the batch, unless the random policy has been deliberately chosen to maximize non-linkability.


Which pseudonymization technique should you choose for your contracts?

The technical choice depends on two parameters: do you need to re-identify the data later, and do you want to maintain correlations between documents?

TechniqueReversibleCross-corpus consistencyAttack resistanceRecommended use for contracts
TokenizationYes (via table)Yes (deterministic)High if table securedNames, company names, relational consistency
Symmetric encryption (AES)Yes (separate key)YesVery highIBANs, national IDs, structured financial data
MAC (message authentication code)NoYes (deterministic)Very highIdentifiers where re-identification is not required
Salted hash (SHA-256 + salt)NoYes if fixed saltMedium (vulnerable to dictionary attacks if data predictable)Low-entropy identifiers not recommended
RNG (random identifier)Yes (via mapping)No by defaultVery highIrreversible exports, definitive redaction

The ENISA report emphasizes that simple hashing without salt remains vulnerable to dictionary attacks, particularly on low-entropy data such as common names or postal codes. For structured identifiers (national IDs, IBANs, company IDs), AES encryption with a key managed by a dedicated KMS or tokenization via an encrypted table offers the best balance.

  • Prefer tokenization or a neutral identifier for the names of natural and legal persons when consistency across documents is necessary.
  • Opt for reversible encryption (AES-256, separate key) for financial data and national identifiers.
  • Reserve RNG for final exports where no re-identification is planned.

Pro tip: If using a deterministic policy on a large corpus, verify that the same pseudonym is not assigned to two distinct entities (collision). A uniqueness check in the lookup table is essential before distribution.


What technical and organizational measures are required?

Key management and mapping separation

The lookup table is the most sensitive element of any pseudonymization system. Its compromise nullifies all protection. Minimum requirements are:

  • Dedicated KMS (key management system) with periodic rotation of encryption keys, access restricted to authorized operators only.
  • Physical or logical separation between the pseudonymized corpus and the lookup table: two distinct environments, two distinct access controls.
  • Encryption at rest and in transit for the lookup table (AES-256 at rest, TLS 1.3 in transit).
  • Access logging: each consultation or modification of the table must be traced with timestamp, operator identifier, and reason for access.

Contractual obligations and auditability

Any service provider accessing the pseudonymized corpus must be bound by a specific confidentiality clause and an explicit limitation of the pseudonymization domain: they cannot attempt to re-identify the data or cross-reference the corpus with other sources. These clauses must appear in the data processing agreement pursuant to Article 28 of the GDPR.

The retention period for the mapping must align with the legal retention period of the original contracts, with secure destruction upon expiry. Access logs must be retained for at least the time necessary for a compliance audit, generally three years.

For transfers to third countries, the EDPB Guidelines 01/2025 specify that pseudonymization may constitute a supplementary measure to standard contractual clauses, provided that the recipient has access neither to the mapping nor to the information allowing re-identification in their context.

Pro tip: Generate a PDF audit report after each batch job: date, volume of documents processed, types of PII detected, technique applied, operator. This report constitutes your evidence of effort in the event of a CNIL inspection.


What risks and pitfalls threaten your pseudonymization process?

Re-identification and contextual attacks

The primary risk is not technical-it is contextual. A "jigsaw attack" involves cross-referencing the pseudonymized corpus with public data (company registry, LinkedIn, business press) to reconstruct the identity of the parties. A supplier contract mentioning a specific amount, a date, and a business sector may suffice to identify the parties even without an explicit name.

Common technical issues

  • Unpurged PDF metadata: the "Author" or "Company" field reveals the identity of the drafter even if the text is pseudonymized.
  • Images and stamps: a scanned company logo or handwritten signature is not processed by an NER engine. These elements must be removed or replaced manually.
  • False-negative NER: names embedded in atypical contractual formulations ("Mr. Managing Director Jean Dupont") or in tables are often missed by standard models.
  • Electronic signatures: certificates embedded in a signed PDF contain the signatory's name in plaintext in the certificate metadata, independent of the visible text.
  • Hidden fields: certain PDF forms store data in fields not displayed on screen but extractable by technical tools.

The operational precaution described by Corporatech explicitly recommends treating metadata and images as separate pipeline stages, not as byproducts of text detection.

Pro tip: After pseudonymization, open the PDF file in a hex editor or use a metadata inspection tool (ExifTool, pdfinfo) to verify the absence of residual data. This check takes two minutes and prevents major incidents.


How to choose a pseudonymization tool for your PDF contracts

Technical and business criteria to evaluate

1. PII detection scope: does the tool cover French-specific identifiers (national IDs, company IDs, French IBANs, permit numbers) in addition to generic entities (names, addresses, dates)?

2. Scanned PDF support: does it have a built-in OCR engine or does it require external preprocessing? OCR quality on degraded documents is a differentiating criterion.

3. Reversibility and mapping management: can the mapping be exported in encrypted format? Who holds the key? Does the provider have access to it?

4. Processing mode: cloud with document storage at the provider, or stateless (in-memory processing without persistence)? For sensitive contracts, stateless mode is preferable.

5. Auditability: does the tool generate a timestamped and signed audit report after each processing?

6. Integrations: REST API available for integration into an existing DMS or workflow? Compatibility with PDF and DOCX formats?

7. Server location: hosting in the European Union mandatory for data subject to the GDPR.

Questions to ask the provider

  • Who holds the mapping encryption keys, and where are they stored?
  • Are processed documents retained, even temporarily, on your servers?
  • Do you have ISO 27001 certification or a SOC 2 report?
  • What are your contractual commitments in the event of a data breach (notification period, liability)?
  • Is your solution covered by a DPA compliant with Article 28 of the GDPR?

Local tools like gdpr-pseudonymizer or the Siegfried project illustrate the 100% local approach, without transmission to a third-party server, with encrypted export of the mapping and mandatory human validation. This architecture is particularly suitable for law firms subject to attorney-client privilege.

Pro tip: Always request a demonstration on your own documents (anonymized for testing) rather than on datasets provided by the vendor. The actual detection rate on your contract types may differ significantly from marketing claims.


What practice reveals that guides don't tell you

Pseudonymization of PDF contracts is often presented as a technical problem. It is first and foremost a governance problem. The incidents we observe do not stem from a poorly chosen technique, but from a lookup table accessible to too many people, a mapping exported without encryption "to save time," or human validation eliminated under deadline pressure.

Safe-doc's stateless solution was designed precisely to address this reality: zero storage by design, native auditability with a PDF report generated after each processing, and detection of more than 90 types of PII including French-specific identifiers. Legal teams that use it do not change their usual AI tools. They add a layer of protection before using them.

The real question is not "should we pseudonymize?" but "how do we ensure the process holds up over time, with team turnover and deadline pressure?" The answer lies in workflow automation and systematic traceability, not manual procedures that no one follows after six months.


Safe-doc: pseudonymize your PDF contracts without storing a single piece of data

Your contracts contain data you cannot entrust to an AI without prior protection. Safe-doc solves this problem without requiring you to change your work habits.

Safe-doc

The platform automatically detects more than 90 types of PII, including French-specific identifiers (national IDs, company IDs, IBANs), processes your native and scanned PDFs in real time, and stores no documents on its servers. The mapping is exported encrypted, under your exclusive control. Each processing generates a timestamped PDF audit report, directly usable in the event of a CNIL inspection.

For legal departments, DPOs, and firms handling sensitive data, Safe-doc integrates via REST API into your existing workflows or can be used directly from the web interface. Consult the page dedicated to DPOs and compliance managers for details on contractual guarantees and security architecture, or access the page on security and zero-storage architecture for technical specifications.


Sources

To explore further or verify the regulatory points covered in this article:

Note: pseudonymization and anonymization are not interchangeable under the law. Only irreversible anonymization removes data from the scope of the GDPR. If in doubt about the classification of processing, consult your DPO or the CNIL before distribution.

This article constitutes general information and does not replace the advice of a qualified attorney. Consult a qualified legal professional regarding your individual situation before acting on the basis of this content.

Recommendation