Introduction
Secured is a browser-native PII detection, obfuscation, and de-obfuscation library for TypeScript applications.
What is Secured?
Secured is a privacy toolkit for TypeScript developers building browser applications. It finds personally identifiable information (PII) in text and files, replaces it with realistic fake data, and lets you restore the originals or review them before release — all without sending data to a third-party service.
The @secured-ai/core package is the foundation of the Secured ecosystem. It runs entirely in the browser using a combination of pattern matching, natural language processing, and optional on-device machine learning.
Start with an SDK access token
Browser SDK initialization requires an SDK access token from the Secured platform. Create one in Settings > SDK Access Tokens, add your allowed origins, then pass it to PrivacyClient with baseUrl. See SDK Access Tokens before starting the quick start.
Key capabilities
PII Detection
Scan plain text or uploaded files for 44 entity types — names, emails, SSNs, credit cards, passports, IP addresses, and more.
Reversible Obfuscation
Replace real PII with convincing fake data. Every substitution is tracked in a session so you can restore originals at any time.
File Processing
Detect and obfuscate PII directly in PDF, DOCX, XLSX, CSV, TXT, JSON, and image files — preserving the original file format.
Text Review
Create a review model, edit replacements, remove items, and finalize a session only after user approval.
Vault-backed Consistency
Reuse replacements from encrypted global or thread-level vault snapshots and maintain runtime thread overlays.
Custom Patterns
Define your own regex-based entity types to detect domain-specific identifiers beyond the built-in set.
Detection engines
@secured-ai/core runs up to five detection engines and intelligently merges their results:
| Engine | Technology | Enabled by default |
|---|---|---|
| Regex | 100+ hand-tuned patterns | Yes |
| NLP | compromise.js | Yes |
| ML | HuggingFace Transformers (WASM) | No |
| GLiNER | Browser ONNX runtime + GLiNER | No |
| Custom | User-defined regex patterns | Yes |
The semantic engines are opt-in because they download heavier browser-side model assets. See the Detection Engines concept page and the ML Engine guide for details.
Package info
| Package | @secured-ai/core |
| Version | 0.1.0 |
| Runtime | Browser only |
| Language | TypeScript |
| Dependencies | Zero runtime dependencies for core logic |
@secured-ai/core is available on npm. See Installation for npm and local workspace setup.