What counts as personal data in a document
Clause 1 of Article 3 of 152-FZ defines personal data as any information that relates to a directly or indirectly identified or identifiable individual. The key word here is “indirectly”: a person can be recognized by more than a surname.
What to look for in a typical legal document:
1. Direct identifiers: surname, first name, patronymic, passport, pension insurance number (SNILS), personal taxpayer number, address, phone, email, bank account number.
2. Indirect signs: a job title in a small company, a date of birth, a case number, the cadastral number of an apartment, a car registration plate, a rare diagnosis.
3. Signatures, seals and stamps on scans, details in headers and footers, and file metadata: author, edit history, comments in the margins.
The name of a legal entity is not personal data, but the names of the director and the signatory almost always sit next to it. Those are replaced, while the company name is protected by a different rule, covered in the last section.
The test is simple: if a person who knows the facts of the case can recognize a participant from the remaining text, the document is not anonymized.
Replacement and the mapping key
For legal texts, the identifier method from Roskomnadzor Order No. 140 of 19 June 2025 usually fits: data that can identify a person is replaced with a code or label. In a contract, this looks like “Buyer 1”, “Address 1”, “Passport 1” instead of the real values.
The same order requires a key that maps the identifiers to the original data, kept separately from the anonymized set and never passed to third parties. Without the key, the lawyer cannot put the names back into the finished draft, and a key kept next to the text makes anonymization pointless.
The procedure for a firm:
1. Replacements are consistent: the same person gets the same label in all documents of the case.
2. The key is stored in the firm’s own system, outside the AI service and outside the folder from which documents go out for processing.
3. The anonymized and original documents are not stored together: the order separately bans storing them together.
4. Names go back into the text only after a lawyer has checked the draft.
Besides replacement, the order allows deletion, distortion and changing attributes, for example replacing part of a value with the “*” sign, as well as shuffling, decomposition and transformation of the data set.
Automatic anonymization
Anonymizing a large contract by hand takes a long time, so the replacements are given to software: it finds names, addresses and document numbers and inserts labels.
Order No. 140 requires anonymization software to keep both the original and the anonymized data secure and confidential. The practical conclusion: the software runs inside the firm, or the original text reaches someone else’s server before it is anonymized.
Two more requirements concern procedure: the operator adopts an internal policy on anonymization and keeps a record of anonymization actions in a form that can prove them. The order has applied since 1 September 2025 and replaced Order No. 996 of 2013.
What software misses most often:
1. Names in inflected forms and abbreviations, initials, a name inside an email address.
2. Data in tables, scans and images without recognized text.
3. Indirect signs that do not look like names: a job title, the date of an event, a rare detail of the facts.
So a person checks the software’s output. Federal Law No. 233-FZ of 8 August 2024 introduced a separate regime: since 1 September 2025, under Article 13.1 of 152-FZ, an operator must, at the request of the authorized body, anonymize data under government rules and pass it to a state information system for data sets. This regime does not apply to preparing documents for AI, but it shows how strictly the law treats anonymization.
When this is not enough
Anonymization settles the personal data question, but not the question of privilege. Under Article 8 of Russia’s Law on Advocacy, attorney-client privilege covers any information related to legal help for a client, and only the client can waive it.
The facts of a dispute, the deal amount, the name of the counterparty and the position in the case stay privileged even after every name is replaced. A public service that receives the anonymized text still receives information related to legal help.
The personal data law also does not treat anonymized text as something entirely different. It speaks of “personal data obtained as a result of anonymization” (Clause 9.1, Part 1, Article 6) and allows research purposes only with mandatory anonymization (Clause 9, Part 1, Article 6).
As long as the firm holds the mapping key, the text can be linked to a person. So a cautious approach treats sending such text to a foreign service as a cross-border transfer, which requires notifying Roskomnadzor in advance under Part 3 of Article 12 of 152-FZ.
When anonymization is not enough:
1. Case files where the facts are the point: family, criminal and employment disputes.
2. Documents that AI must match against other cases and the firm’s correspondence.
3. Hundreds of documents a day, where manual checking of replacements eats up the time saved.
In these cases, the model is placed in a closed environment, on the firm’s server or in a cloud in Russia, and documents are processed without replacements. How this works is covered in the materials about a local AI model for lawyers and about AI and personal data, and you can test it on your own documents in a pilot.