A new open-source Chrome extension called Docx Anonymizer allows users to automatically anonymize personal data in documents before uploading them to public AI services such as ChatGPT. The tool was developed to reduce the risk of violating Russia’s 152-FZ personal data protection law when employees send long contracts or other files containing names, organizations, and identifiers to cloud-based language models.
According to telemetry from the Solar Group, the volume of corporate data sent to public neural networks in Russia grew 30-fold in 2025, including legal documents. In one notable case, a Moscow court upheld the dismissal of a sales director who had uploaded internal reports to DeepSeek, resulting in the loss of a multi-million-ruble severance claim. These incidents highlight the need for lightweight, local anonymization solutions that do not themselves rely on cloud services.
The extension was built as a pure client-side JavaScript Chrome extension that intercepts text on any AI chat page, runs named-entity recognition locally, and replaces detected entities in real time. It never makes network requests, contains no telemetry, and can be installed without the Chrome Web Store. The developer deliberately avoided complex desktop applications to keep the workflow as short as possible.
The core model is a fine-tuned version of rubert-tiny2, a compact Russian BERT variant that runs in the browser through ONNX Runtime and WebAssembly. After int8 quantization the model occupies only 30 MB. Cold start takes approximately 0.3 seconds, and a 20-page contract is processed in about 1.7 seconds on a single thread inside a worker.
Training involved two iterations. The first used WikiANN data plus synthetic contract templates and knowledge distillation from a larger xlm-roberta-base teacher model. The second iteration added factRuEval news texts and 35 % synthetic business documents covering commercial proposals, invoices, meeting minutes, and chat messages. Negative examples such as capitalized headings and product names were explicitly included to reduce false positives on organizations. Final F1 scores on held-out data reached 0.913 for persons and 0.756 for organizations on WikiANN Russian test, with significantly improved results on real business genres.
The extension currently supports PDF files that contain a text layer; scanned documents are not processed. While organization names remain the most challenging class, the interface allows quick manual verification of any replacement. The full source code is available on GitHub under an open license, and the developer welcomes contributions of additional datasets or synthetic examples for further model improvement.

