Open source desktop (Electron) and browser (PWA) application for anonymising documents into LLM-ready Markdown with comprehensive PII detection and multilingual support.
Converts sensitive documents (Word, Excel, PDF, CSV, TXT) into clean, anonymised Markdown files ready for use with Large Language Models (ChatGPT, Claude, Gemini, etc.). All processing happens 100% locally - no cloud, no API calls, complete privacy.
β Dual Platform - Electron desktop app + Browser PWA (same core capabilities) β LLM-Ready Markdown Output - Clean, structured format perfect for AI workflows β 100% Local Processing - Your data never leaves your device β Multi-Format Support - DOCX, PDF, Excel, CSV, TXT β Entity Mapping - JSON file mapping anonymised tokens back to originals β Multilingual UI - English, French, German with automatic detection β Hybrid PII Detection - ML model (94%+ accuracy) + rule-based patterns β Swiss & EU Specialized - AVS/AHV numbers, IBAN, UID, VAT IDs β File Preview - Real-time preview and metadata display β Modern UI - Clean, professional interface with drag-and-drop
Visit the deployed PWA at your hosted URL, or run locally:
cd browser-app
npm install
npm run dev # Opens in browser at http://localhost:5173Features:
- Same capabilities as desktop app
- 100% client-side processing using Web Workers
- Installable PWA (Add to Home Screen) with offline support
- Works on any modern browser (Chrome, Firefox, Safari, Edge)
# Clone repository
git clone https://github.com/ch8ri0s/A5-PII-Anonymizer.git
cd A5-PII-Anonymizer
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for your platform
npm run build:mac # macOS
npm run build:win # Windows
npm run build:linux # Linux- Drop files or click to browse
- Preview file content and metadata
- Process - Click "Process File"
- Download results:
filename-anon.md- Anonymised Markdownfilename-mapping.json- Entity mapping
| Aspect | Desktop App (Electron) | Browser PWA |
|---|---|---|
| Installation | DMG/EXE/AppImage | No install (visit URL) |
| Processing | 100% local, Node.js | 100% client-side, Web Workers |
| Performance | Best for large files | Excellent on modern browsers |
| Offline | Always works | Works after first load |
| Updates | Via installer | Automatic (web deploy) |
| Feature Parity | Full | Full (same core pipeline) |
The application automatically detects your system language:
- π¬π§ English - Default language
- π«π· FranΓ§ais - Complete French translation
- π©πͺ Deutsch - Complete German translation
Features:
- Automatic OS language detection
- One-click language switching
- Locale-specific date/time/number formatting
- Persistent language preference
π Read the i18n Implementation Guide β
Customer Information
Name: Hans MΓΌller
Email: hans.mueller@example.ch
Phone: +41 79 123 45 67
Address: Bahnhofstrasse 1, 8001 ZΓΌrich
AVS Number: 756.1234.5678.90
IBAN: CH93 0076 2011 6238 5295 7
---
source: customer_data.docx
processed: 2025-11-12T14:30:00Z
anonymised: true
---
# Customer Information
Name: NAME_1
Email: EMAIL_1
Phone: PHONE_1
Address: ADDRESS_1
AVS Number: SWISS_AVS_1
IBAN: IBAN_1{
"version": "2.0",
"timestamp": "2025-11-12T14:30:00Z",
"entities": {
"Hans MΓΌller": "NAME_1",
"hans.mueller@example.ch": "EMAIL_1",
"+41 79 123 45 67": "PHONE_1",
"Bahnhofstrasse 1, 8001 ZΓΌrich": "ADDRESS_1",
"756.1234.5678.90": "SWISS_AVS_1",
"CH93 0076 2011 6238 5295 7": "IBAN_1"
}
}| Type | Format | Validation |
|---|---|---|
| AVS/AHV Number | 756.XXXX.XXXX.XX | EAN-13 checksum |
| IBAN | CH93 0076 2011... | Mod-97 algorithm |
| Swiss UID | CHE-123.456.789 | Format validation |
| Bank Account | BC-XXXXX-X | Legacy format |
- EU VAT Numbers - All EU formats
- IBAN - All 77 IBAN countries
- EHIC - European Health Insurance Cards
- National IDs - Country-specific patterns
| Format | Extensions | Quality | Notes |
|---|---|---|---|
| Plain Text | .txt |
β Perfect | Direct conversion |
| CSV | .csv |
β Perfect | Markdown tables |
| Word | .docx |
β Excellent (90%+) | Full structure |
| Excel | .xlsx, .xls |
β Excellent | Multi-sheet |
.pdf |
Heuristic parsing |
Both Electron and Browser PWA share the same core architecture:
βββ shared/ # Shared code (validators, patterns, types)
β βββ pii/ # PII detection core
β βββ validators/ # Entity validators
β βββ context/ # Context enhancement
β βββ ml/ # ML utilities
β
βββ src/ # Electron app
β βββ converters/ # Format converters
β βββ pii/ # Detection pipeline
β βββ i18n/ # Internationalization
β βββ services/ # IPC handlers
β
βββ browser-app/ # Browser PWA
β βββ src/
β βββ converters/ # Browser converters
β βββ pii/ # Browser detection passes
β βββ workers/ # Web Workers for ML
β βββ ui/ # UI components
For more details, see docs/architecture.md.
- β 100% Local Processing - No internet required
- β No Telemetry - Zero tracking or analytics
- β Context Isolation - Sandboxed renderer process
- β IPC Validation - Secure inter-process communication
- β Path Protection - Directory traversal prevention
- β CSP Enabled - Content Security Policy active
Security Audit: View Full Report β
This tool helps comply with EU GDPR and Swiss nFADP:
- β Art. 5 GDPR - Data minimization and purpose limitation
- β Art. 32 GDPR - Pseudonymization of personal data
- β Art. 30 GDPR - Local mapping file as processing record
- β Art. 15 GDPR - De-anonymization capability maintained
Anonymise contracts, reports, or customer data before uploading to ChatGPT/Claude for analysis.
Build vector databases from sensitive documents without exposing PII.
Create privacy-safe fine-tuning datasets from real customer interactions.
Share anonymised documents with external reviewers without privacy concerns.
# Electron app tests (2294 tests)
npm test
# Browser app tests (1021 tests)
cd browser-app && npm test
# i18n tests only
npm run test:i18nThis project uses LoggerFactory for centralized, structured logging. Never use console.* directly.
// Electron app
import { LoggerFactory } from './utils/LoggerFactory';
const log = LoggerFactory.create('my-module');
log.info('Processing started', { itemCount: 10 });
// Browser app
import { createLogger } from './utils/logger';
const log = createLogger('my-module');
log.info('Processing started', { itemCount: 10 });See: CLAUDE.md Β§ Logging for full documentation.
npm run dev # Development mode
npm run build # All platforms
npm run build:mac # macOS only
npm run build:win # Windows only
npm run build:linux # Linux onlyCore:
electron^39.1.1 - Desktop framework@xenova/transformers2.17.2 - ML inferenceexceljs^4.4.0 - Excel processingmammoth^1.11.0 - DOCX extractionpdf-parse^1.1.1 - PDF parsingturndown^7.2.2 - HTML to Markdown
Contributions welcome! This project is open source under MIT License.
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- π Additional language translations (Spanish, Italian, etc.)
- π More file format converters
- π Improved PDF structure detection
- π Country-specific PII patterns
- β Test coverage expansion
- π Documentation improvements
- π Bug fixes
- Issues: Open an issue on GitHub
- Documentation:
Based on A5-PII-Anonymizer by Agentic A5
- BetterData AI - PII Detection Model (Apache 2.0)
- Xenova - Transformers.js (Apache 2.0)
- Microsoft - DeBERTa (MIT)
- Electron - Desktop framework (MIT)
- π FIX: DATE entities no longer lost to postal code detection
- β¨ NEW: Comprehensive DATE detection E2E tests
- β¨ NEW: Cross-platform behavior consistency tests
- β¨ NEW: Browser PWA with same capabilities as desktop
- β¨ NEW: Complete French and German translations
- β¨ NEW: Automatic OS language detection
- β¨ NEW: File preview panel with metadata
- β¨ NEW: Modern card-based UI redesign
- β¨ NEW: Comprehensive test suite (3000+ tests)
- π IMPROVED: Security audit and fixes
- β‘ IMPROVED: Performance optimizations
- Initial release with PII detection
- Multi-format document support
- Electron desktop application
MIT License - Free and open source
Copyright (c) 2024 Agentic A5 (Original A5-PII-Anonymizer)
Copyright (c) 2025 Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
β Commercial use | β Modification | β Distribution | β Private use
Made with β€οΈ for privacy-conscious LLM users
Based on A5-PII-Anonymizer by Agentic A5