Docx Anonymizer: Open-Source Chrome Extension Uses Fine-Tuned rubert-tiny2 to Anonymize Personal Data Before AI Uploads

A Russian developer has released Docx Anonymizer, a browser extension that automatically detects and replaces personal data in documents using a lightweight NER model before they reach public AI services such as ChatGPT. The tool was created to help organizations comply with Russia’s 152-FZ personal data protection law while avoiding the risks of uploading contracts and other sensitive files to cloud-based LLMs. It runs entirely locally via ONNX Runtime and WebAssembly, requires no network calls, and supports any AI chat interface. The underlying model, rubert-tiny2, was further trained through knowledge distillation on WikiANN, factRuEval, and synthetic business documents, reaching strong F1 scores for person and organization entities after int8 quantization. The extension intercepts text on the fly, performs named-entity recognition in under two seconds for typical contracts, and replaces detected entities with placeholders. The project is fully open source and designed for minimal user friction, addressing the growing problem of employees inadvertently leaking corporate and personal data to public AI platforms.

HabrTranslated from Russian

Read at source

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.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Privacy & Surveillance

Maximizing iPhone Privacy: Essential Settings to Enable, Disable, and Verify Immediately
Top 10 Secure DNS Servers for Privacy, Threat Blocking and Ad Filtering in 2026
WebRTC IP Leaks Explained: Why Disabling the Protocol Harms Anonymity in Anti-Detect Browsers