# Maskera (maskera.dev) > Swedish-first, local PII redaction in front of any AI model. Names, personnummer, addresses, phone numbers, and other Swedish personal data are masked on-device (browser via WebGPU/WASM, Chrome/Edge extension, local proxy/MCP server via `@maskera/mcp`, or Node.js) before text leaves your process. Text and restore maps never leave your device, the packages contain no telemetry, and maskera.dev is hosted on Cloudflare Workers with no analytics scripts or cookies. Model weights and the WASM runtime are static assets fetched once and cached (both can be self-hosted). Three open-source packages (MIT), two detection layers (rules first): - `@maskera/mcp` (npm, v0.5.3): local-first CLI for AI agents (`wrap`, `proxy`, stdio `mcp`, `guard`, `redact`, `install`, `doctor`, `service`). - `@maskera/core` (npm, v0.9.3): zero-dependency, synchronous deterministic detectors for structured Swedish PII (personnummer, samordningsnummer, organisationsnummer, phone, email, postnummer, bankgiro, plusgiro, IBAN, cards, IP, URL, plus opt-in `heuristicDetectors` and `contextualDetectors`). Custom patterns join via `regexDetector`. - `maskera` (npm, v0.15.0): everything in core plus `maskera-sv-ner` v24 (68 MB q4 ONNX) for free-text names, places, organisations, and street addresses, including all-lowercase chat text. Enables street address, lägenhetsnummer, and context-labeled account/journal detectors by default (`regnummer` is opt-in); pass `profile: "clinical"` to retain common measurements, doses, and care terms. Quick start (SDK): ```ts import { createNerRecognizer, redactWithNer } from "maskera" const recognizer = createNerRecognizer() const { text, restore } = await redactWithNer( "hej jag heter provnamn maskera, personnummer 19900101-2385, och bor i provbyn", { recognizer }, ) // "hej jag heter [NAMN_1], personnummer [PERSONNUMMER_1], och bor i [PLATS_1]" ``` ## Independent Swedish benchmark (v24 q4, 2026-11-30) Measured on CPU across SUC 3.0 test, SIC2 Swedish blogs, MultiCoNER v2 Swedish persons, and ai4privacy openpii Swedish rows (23,980 texts, 0 rows in Maskera training): Maskera v24 q4 hid 97% of names (12,198/12,570), 92.8% of lowercase names, 97.3% of places, and 95.2% of street addresses and postcodes. | Tool | Size | Names | Lowercase names | Places | Addresses & postcodes | Hit on entity-free sentence (lower is better) | | --- | --- | --- | --- | --- | --- | --- | | Maskera v24 q4 | 68 MB | 97.0% | 92.8% | 97.3% | 95.2% | 4.4% | | Microsoft Presidio 2.2.366 (`sv_core_news_lg`) | 245 MB | 72.3% | 71.4% | 97.1% | 47.0% | 2.5% | | `swedish-pii` 1.2.0 | 5 MB | 55.3% | 0.3% | 82.7% | 77.3% | 7.0% | | OpenAI Privacy Filter q4 ONNX | 945 MB | 52.2% | 10.3% | 33.5% | 63.3% | 3.5% | Presidio's spaCy model is trained on SUC 3.0. Personnummer, organisationsnummer, bankgiro, and IBAN have no independent Swedish corpus and are covered by deterministic rules with checksum validation. Raw results: https://github.com/joelhagvall/maskera/blob/main/docs/benchmark-independent-v24.json. Full report and internal release gates: https://github.com/joelhagvall/maskera/blob/main/docs/BENCHMARKS.md. ## Deployment, GDPR/DPA, and pricing All masking runs locally on the user's device; there is no hosted masking API and no DPA (Swedish: PUB-avtal) is required with Hägvall Labs AB for masked text because customer text never leaves the user's device. Maskera supports GDPR data minimisation (Art. 5(1)(c), Swedish: dataminimering) and data protection by design (Art. 25, Swedish: inbyggt dataskydd), and is a Swedish-first on-device alternative to Microsoft Presidio, `swedish-pii`, and server-side DLP tools. Entity identity: Maskera is developed and operated by Hägvall Labs AB (org.nr 559598-0110, Stockholm, Sweden; founder Joel Hägvall; contact `hej@maskera.dev`). Open-source engine, CLI, MCP server and Swedish NER model are MIT-licensed. The browser extension for Chrome and Edge (Chrome Web Store: https://chromewebstore.google.com/detail/maskera/gjllhfldkkmbdhjhldjkglcihjdicbbe; info: https://maskera.dev/en/services, Swedish: https://maskera.dev/tjanster) masks chat text plus attached PDF, Word (DOCX), Excel (XLSX), and text files locally: - Free: SEK 0 (unlimited deterministic rules + 20 local AI maskings/month, no account needed). - Pro at SEK 149/month incl. VAT (7-day free trial, unlimited local AI masking, own protected words, offline licences). - Team at SEK 249/user/month excl. VAT (min. 5 users, shared E2EE protected-word list, MDM deployment via Intune/Jamf/Google Workspace, annual invoicing, volume pricing on quote). Subscriptions and offline licences are managed via https://app.maskera.dev. The portal handles accounts, offline licences, and billing only; customer text never reaches it. ## When to use Maskera Reach for Maskera when: - The text is Swedish (or mixed Swedish/English) and may contain personal data (names, personnummer, samordningsnummer, organisationsnummer, street addresses, lägenhetsnummer, postnummer, phone numbers, email, bankgiro, plusgiro, IBAN, card numbers, IP addresses, journal/account IDs, or vehicle registration numbers). - The text or document (PDF, DOCX, XLSX, text) is about to cross a trust boundary (LLM prompt, AI agent file read, log, analytics, support transcript, evaluation corpus). - Masking must happen locally and remain reversible for the caller via a restore map. Best-fit jobs: AI agents (Claude Code, Codex, Cursor, Claude Desktop, OpenCode, T3 Code), web AI chats (Microsoft Copilot, ChatGPT, Claude, Gemini, Perplexity, Mistral, and opt-in internal AI sites), HR/recruiting, customer support, healthcare notes (`profile: "clinical"`), legal and municipal case text, log scrubbing, and de-identified test data. Not a fit: non-Swedish text, scanned image/PDF OCR (pass extracted text), a hosted masking API, or a compliance guarantee (the NER layer can miss edge cases). ## How an agent should call it Choose **proxy** for text typed straight into chat and tool results (in clients that accept a custom API URL), or **MCP** for local files read via Maskera tools. 1. **Local LLM proxy + warm Streamable HTTP MCP:** - One-command wrapper: `npx -y @maskera/mcp wrap -- claude` (or `-- codex`). - Persistent proxy on `127.0.0.1:8787`: `npx -y @maskera/mcp proxy --root /path/to/workspace` (or `service install` for `launchd`/`systemd --user`). Routes Anthropic (`/v1/messages`) and OpenAI (`/v1/chat/completions`, `/v1/responses`), exposes Streamable HTTP MCP at `http://127.0.0.1:8787/mcp` (`?no_raw_restore=1`, `?read_only=1`, `?approval_mode=browser`), serves the local live inspector at `http://127.0.0.1:8787/_maskera` (JSON counts: `/_maskera/status`), restores chunk-split SSE streams, and fails closed (`502`) on error. - Client config: - Claude Code / Anthropic SDK: `ANTHROPIC_BASE_URL=http://127.0.0.1:8787` - Codex (API key) / Cursor / OpenAI SDK: `OPENAI_BASE_URL=http://127.0.0.1:8787/v1` - Claude Desktop: Developer -> Configure Third-Party Inference, base URL `http://127.0.0.1:8787` (no `/v1`), Anthropic API key, auth scheme `x-api-key` (Anthropic rejects `Bearer`). Guide: https://github.com/joelhagvall/maskera/tree/main/packages/mcp#claude-desktop-through-the-proxy - Codex signed in with a ChatGPT subscription cannot use a plain-HTTP proxy; use MCP stdio instead. 2. **MCP stdio server (Claude Desktop, Cursor, Claude Code, Codex, OpenCode, T3 Code):** - Auto-configure and verify: `npx -y @maskera/mcp install [client|all] --root /path/to/workspace --no-raw-restore` (or `doctor` to verify an existing setup). - Manual `mcpServers` config: ```json { "mcpServers": { "maskera": { "command": "npx", "args": ["-y", "@maskera/mcp", "--root", "/path/to/workspace", "--no-raw-restore"] } } } ``` - Core tools: `maskera_list_files`, `maskera_search_files`, `maskera_read_file`, `maskera_redact_file`, `maskera_write_file`, `maskera_redact`, `maskera_restore`, `maskera_list_sessions`, `maskera_clear_session`, `maskera_status`, `maskera_resume`. Prompts: `maskera-workflow`, `maskera-redact-file`. Resources: `maskera://skills/maskera/SKILL.md`, `maskera://status`. 3. **Hook / shell guard & file redaction:** - Block prompts, files, or hook JSON containing PII: `npx -y @maskera/mcp guard` (`exit 2` with counts only, `0` if clean; `--file `, `--redact` for streams). - Redact PDF (burned pixels + stripped metadata), DOCX, XLSX, or text on disk: `npx -y @maskera/mcp redact input.pdf -o output.masked.pdf`. 4. **Agent skill:** - Install `skills/maskera/SKILL.md`: `npx skills add joelhagvall/maskera`. 5. **Application SDK (browser or Node.js):** - `npm install maskera @huggingface/transformers` or `npm install @maskera/core`. 6. **Web AI chats:** - Install the local Chrome/Edge browser extension via https://maskera.dev/en/services (Swedish: https://maskera.dev/tjanster). 7. **On this site:** - Send `Accept: text/markdown` to any page URL, or fetch the `.md` sibling directly (`https://maskera.dev/index.md`, `https://maskera.dev/en/docs.md`, `https://maskera.dev/en/about.md`). - Fetch the entire site in one file: `https://maskera.dev/llms-full.txt` (English) or `https://maskera.dev/llms-full-sv.txt` (Swedish). - Unknown paths return HTTP 404 in Markdown, JSON (`Accept: application/json` or `/api/*`), or HTML. `maskera.dev/api/*` is not an API. ## Docs - [README (English)](https://github.com/joelhagvall/maskera#readme): install, API, architecture - [@maskera/mcp README](https://github.com/joelhagvall/maskera/tree/main/packages/mcp#readme): proxy, MCP server, guard, and CLI options - [MCP audit report](https://github.com/joelhagvall/maskera/blob/main/packages/mcp/AUDIT.md): security audit, findings, and gates ([threat model](https://github.com/joelhagvall/maskera/blob/main/packages/mcp/THREAT_MODEL.md), [release gates](https://github.com/joelhagvall/maskera/blob/main/packages/mcp/RELEASE_GATES.md), [JSON evidence](https://github.com/joelhagvall/maskera/blob/main/packages/mcp/audit-results.json)) - [Benchmarks](https://github.com/joelhagvall/maskera/blob/main/docs/BENCHMARKS.md): full report and internal release gates - [Production notes](https://github.com/joelhagvall/maskera/blob/main/docs/PRODUCTION.md): self-hosting, thresholds, and fallback - [Transparency](https://github.com/joelhagvall/maskera/blob/main/docs/TRANSPARENCY.md): privacy boundary and data handling - [Training data protection](https://github.com/joelhagvall/maskera/blob/main/docs/TRAINING_DATA_PROTECTION.md): v24 synthetic attestation, identifier rejection, and KB-BERT boundary ## Packages and model - [@maskera/mcp on npm](https://www.npmjs.com/package/@maskera/mcp) - [maskera on npm](https://www.npmjs.com/package/maskera) - [@maskera/core on npm](https://www.npmjs.com/package/@maskera/core) - [maskera-sv-ner on Hugging Face](https://huggingface.co/joelhagvall/maskera-sv-ner) - [Maskera on Chrome Web Store](https://chromewebstore.google.com/detail/maskera/gjllhfldkkmbdhjhldjkglcihjdicbbe) ## Machine-readable entry points - [Full English corpus (llms-full.txt)](https://maskera.dev/llms-full.txt): single-file Markdown concatenation of every English page on maskera.dev - [Full Swedish corpus (llms-full-sv.txt)](https://maskera.dev/llms-full-sv.txt): single-file Markdown concatenation of every Swedish page on maskera.dev - [Markdown renderings](https://maskera.dev/index.md): `.md` sibling of every page (`Accept: text/markdown`) - [Sitemap](https://maskera.dev/sitemap.xml): all pages in Swedish and English with reciprocal hreflang - [Security disclosure (security.txt)](https://maskera.dev/.well-known/security.txt): RFC 9116 vulnerability disclosure contacts and policy - [Agent skills discovery index](https://maskera.dev/.well-known/agent-skills/index.json): RFC v0.2.0 discovery index with SHA-256 digest for `SKILL.md` - [MCP server discovery card](https://maskera.dev/.well-known/mcp/server-card.json): machine-readable `@maskera/mcp` transports, 11 tools, prompts, resources, and local-only invariants - [Benchmark contract](https://maskera.dev/benchmark-release.json): release measurements ([schema](https://maskera.dev/benchmark-release.schema.json)) - [Whitepaper (PDF)](https://maskera.dev/whitepaper.pdf): architecture, privacy model, and measurements - [Security and MCP audit](https://maskera.dev/en/security): security posture, disclosure, and `@maskera/mcp` audit (Swedish: https://maskera.dev/sakerhet) - [About and contact](https://maskera.dev/en/about): Hägvall Labs AB (org.nr 559598-0110, Stockholm), hej@maskera.dev (Swedish: https://maskera.dev/om) - [Agent setup prompt](https://maskera.dev/setup-prompt.md): copy-paste prompt to configure and verify `@maskera/mcp` - [Documentation](https://maskera.dev/en/docs): quickstart, `/en/docs/mcp`, `/en/docs/clients`, `/en/docs/sdk`, `/en/docs/troubleshooting` (Swedish: https://maskera.dev/docs) - [FAQ](https://maskera.dev/en/faq): data protection, agreements, browsers, offline use, pricing, and MDM (Swedish: https://maskera.dev/fragor) - [Industries](https://maskera.dev/en/industries): HR, healthcare, legal, public sector, and support (Swedish: https://maskera.dev/branscher) - [Maskera vs Microsoft Presidio](https://maskera.dev/en/vs-presidio): benchmark and architecture comparison for Swedish PII (Swedish: https://maskera.dev/jamfor/presidio) - [Maskera vs Avidentifiera.se](https://maskera.dev/en/vs-avidentifiera): on-device masking vs hosted cloud OCR/API comparison (Swedish: https://maskera.dev/jamfor/avidentifiera) - [GDPR guide for AI chats](https://maskera.dev/en/guides/chatgpt-gdpr): masking Swedish personal data before ChatGPT and Copilot without a DPA (Swedish: https://maskera.dev/guider/chatgpt-gdpr) ## Optional - [Live demo](https://maskera.dev/): paste Swedish text and test masking in the browser - [Products & pricing](https://maskera.dev/tjanster): browser extension, `@maskera/mcp`, and SDK (English: https://maskera.dev/en/services) - [Customer portal](https://app.maskera.dev/login): account sign-in, subscriptions, offline licences, and billing - [Source repository](https://github.com/joelhagvall/maskera) --- # Use AI without sharing personal data. > Maskera is the local privacy layer in front of every AI model: mask Swedish personal data in the browser extension, via @maskera/mcp, or in npm code. > > Canonical: https://maskera.dev/en (en) · sv: https://maskera.dev/ · Markdown: https://maskera.dev/en.md · Overview for agents: https://maskera.dev/llms.txt Maskera is a privacy layer in front of AI: Swedish names, personal identity numbers, addresses and other personal data are swapped for placeholders like `[NAMN_1]` before the AI sees them, in the browser, in your AI agents and in your own code. Everything runs **locally on your device**. [Add to Chrome, it's free](https://chromewebstore.google.com/detail/maskera/gjllhfldkkmbdhjhldjkglcihjdicbbe) · [Connect to your agent](https://maskera.dev/en/docs) Choose where Maskera runs ![Maskera's preview in an AI chat: Bo Ek, the personal identity number, Boden, Liv Ek and the phone number become placeholders, while the termination, redeployment review and Swedish employment law (LAS) stay, so the AI can assess the risk.](https://maskera.dev/hero/extension-preview-juridik.webp?v=80f73f2c) ![Maskera's popup with the Mask when I send switch, the Swedish AI model and 20 of 20 AI maskings left.](https://maskera.dev/hero/extension-popup.webp?v=f72463ed) [**97.0%** of names in independent Swedish text →](https://maskera.dev/en/accuracy) · [**68 MB**, runs locally on your device →](https://maskera.dev/en/security) · [**MIT**, open-source engine and model](https://github.com/joelhagvall/maskera) ## Browser extension Free / Pro / Team Mask text and attached PDF, Word, Excel and text files directly in AI chats such as Copilot, ChatGPT and Claude. [Install →](https://maskera.dev/en/services#tillagg) ## AI agents (Proxy & MCP) MIT · Free Local proxy, MCP server and guard for AI agents such as Claude Code and Codex. [Set up →](https://maskera.dev/en/services#agenter) ## Own code (SDK) MIT · Free Mask Swedish personal data in your own web app or Node service. [Get started →](https://maskera.dev/en/services#kod) ## Try it yourself Maskera supports Swedish text only and does not translate other languages, so the examples stay in Swedish. Fictional people and official test values. [About the test data](https://maskera.dev/en/test-data) ## For IT and data protection ### Your original text stays on your device Masking runs in the browser or on the computer. Maskera never receives the text or the key that restores it. ### Open and auditable The engine and the model are open source (MIT). Every model file is checked with SHA-256 before it is used. ### Central deployment With Team you deploy the extension and a shared word list through Intune, Jamf or Google Workspace. ### Openly tested Accuracy is measured and published, with known weak spots. The test scripts are open on GitHub. [Security and data flow →](https://maskera.dev/en/security) · [Industries →](https://maskera.dev/en/industries) · [FAQ →](https://maskera.dev/en/faq) ## Start with what you already use [Add to Chrome, it's free](https://chromewebstore.google.com/detail/maskera/gjllhfldkkmbdhjhldjkglcihjdicbbe) · [Connect to your agent](https://maskera.dev/en/docs) --- # One privacy layer, three ways to use it > Choose how to mask Swedish personal data locally: browser extension (Free, Pro, Team), local proxy and MCP for AI agents, or open-source npm SDK. > > Canonical: https://maskera.dev/en/services (en) · sv: https://maskera.dev/tjanster · Markdown: https://maskera.dev/en/services.md · Overview for agents: https://maskera.dev/llms.txt The same Swedish model and rules in all three. Everything runs on your device, and no text is sent to Maskera. ## Overview | | Browser extension | AI agents (Proxy & MCP) | Own code (SDK) | | --- | --- | --- | --- | | For | Anyone who chats with AI | Developers with AI agents | Teams building their own apps | | Runs in | Chrome and Edge | Local proxy, MCP server and hooks | The browser or Node 18+ | | Protection | Masks when you send | Blocks rather than sends unmasked | You decide in code | | Price | Free, Pro SEK 149, Team SEK 249/mo | Free, MIT | Free, MIT | | | [Install ↓](#tillagg) | [Set up ↓](#agenter) | [Get started ↓](#kod) | ## Browser extension Free / Pro / Team Mask text and attached PDF, Word, Excel and text files directly in AI chats such as Copilot, ChatGPT and Claude. No account is needed until you activate Pro. Waiting for your browser's store? [Download the ZIP file](https://app.maskera.dev/downloads/maskera-extension-0.3.3.zip) and load it unpacked via chrome://extensions or edge://extensions. - [Chrome (Chrome Web Store)](https://chromewebstore.google.com/detail/maskera/gjllhfldkkmbdhjhldjkglcihjdicbbe) - [Edge (Chrome Web Store)](https://chromewebstore.google.com/detail/maskera/gjllhfldkkmbdhjhldjkglcihjdicbbe) - Firefox (Firefox Add-ons) · Soon - Safari (Mac App Store) · Soon ## Pricing: Free, Pro and Team | Feature | Free (SEK 0) | Pro (SEK 149/mo incl. VAT) | Team (SEK 249/user/mo excl. VAT) | | --- | --- | --- | --- | | Rule-based masking (personal IDs, email, phone, accounts) | Unlimited | Unlimited | Unlimited | | Local AI masking for Swedish names and addresses | 20 per month | Unlimited | Unlimited | | Custom protected words | Not included | Included | Included | | Shared team word list, optionally encrypted (AES-256-GCM) | Not included | Not included | Included | | Central deployment (MDM) for Chrome and Edge | Not included | Not included | Included | | Rollout support (extension and AI agents) | Not included | Not included | Included | | Billing and terms | No account needed | Card (7 days free) | Card or annual invoice (5+ users) | Pro: SEK 149/month incl. VAT First 7 days cost SEK 0. A card is required. Cancel in the customer portal before the next charge. [Try Pro free for 7 days](https://app.maskera.dev/en/login?buy=extension-pro&signup=true&utm_source=maskera_dev&utm_medium=referral&utm_content=services_compare_trial) [Maskera Pro terms of sale](https://app.maskera.dev/en/extension/terms?utm_source=maskera_dev&utm_medium=referral&utm_content=services_extension_terms) · [Extension privacy](https://app.maskera.dev/en/extension/privacy?utm_source=maskera_dev&utm_medium=referral&utm_content=services_extension_privacy) Team: SEK 249/user/month excl. VAT Minimum 5 users. Pay by card or annual invoice. Volume pricing on quote for larger organisations. [Start Team](https://app.maskera.dev/en/login?buy=extension-team&signup=true&utm_source=maskera_dev&utm_medium=referral&utm_content=services_compare_team) [Request an annual invoice](mailto:hej@maskera.dev?subject=Maskera%20Team) · [Brief for IT and DPO](https://maskera.dev/en/security#dpo) ## AI agents (Proxy & MCP) MIT · Free Maskera sits in front of AI agents such as Claude Code and Codex. - Proxy: masks everything you type in the chat and attached PDF, Word and Excel documents, in clients that accept a custom API URL. - MCP server: the agent reads, searches and redacts text, PDF, Word and Excel files locally without seeing raw data. - Guard and CLI: stops prompts and files with personal data, or writes a redacted copy with maskera-mcp redact. [Get started in the docs](https://maskera.dev/en/docs/mcp) · [@maskera/mcp on npm](https://www.npmjs.com/package/@maskera/mcp) ## Own code (SDK) MIT · Free One npm package with the rules and the Swedish AI model. Runs in the browser or in Node 18+, with an optional clinical profile that keeps diagnoses and doses. npm ``` npm install maskera @huggingface/transformers ``` [Read the SDK docs](https://maskera.dev/en/docs/sdk) · [Source code on GitHub](https://github.com/joelhagvall/maskera) [See exactly what is masked](https://maskera.dev/en/privacy#vad-maskeras) · [See test results and limitations](https://maskera.dev/en/accuracy) · [Industries](https://maskera.dev/en/industries) · [FAQ](https://maskera.dev/en/faq) · [About & contact](https://maskera.dev/en/about) · [Maskera vs Presidio](https://maskera.dev/en/vs-presidio) · [Maskera vs Avidentifiera.se](https://maskera.dev/en/vs-avidentifiera) · [Guide: AI and GDPR](https://maskera.dev/en/guides/chatgpt-gdpr) --- # Documentation > Get started with local Swedish PII masking: browser extension, local LLM proxy, Streamable HTTP or stdio MCP, guard hooks, and npm SDK. > > Canonical: https://maskera.dev/en/docs (en) · sv: https://maskera.dev/docs · Markdown: https://maskera.dev/en/docs.md · Overview for agents: https://maskera.dev/llms.txt All masking in Maskera runs locally on your device. Pick the mode that fits where your text lives and verify with made-up data. [Overview](https://maskera.dev/en/docs) · [@maskera/mcp](https://maskera.dev/en/docs/mcp) · [Client guides](https://maskera.dev/en/docs/clients) · [SDK & operations](https://maskera.dev/en/docs/sdk) · [Troubleshooting](https://maskera.dev/en/docs/troubleshooting) Let your agent set up Maskera [Open llms.txt](https://maskera.dev/llms.txt) You know it worked when Run npx -y @maskera/mcp doctor. The report should start with OK and end with a sample redaction that shows 0 leaks. Terminal ``` npx -y @maskera/mcp doctor maskera-mcp doctor (OK, v0.5.3, mode=auto) [ok] node: Node 24.22.1 (requires >=18) [ok] root:/Users/you/project: Readable directory [ok] redaction: mode=hybrid, masked=4 items, roundtrip=ok (415ms) [ok] proxy: Running at http://127.0.0.1:8787 (mcp=http://127.0.0.1:8787/mcp, requests=1, redacted=0) [ok] mcp-http: Live http://127.0.0.1:8787/mcp masked synthetic PII (0 leaks, 14ms) [ok] proof: "Kontakta [NAMN_1] ([PERSONNUMMER_1]) på [EPOST_1] eller [TELEFON_1]." (0 leaks, restored=ok) ``` ## Choose the right mode Every entry point runs the same Swedish rules and local AI model. | Mode | Best when | Command / entry point | | --- | --- | --- | | Browser extension | You use web AI chats such as Copilot, ChatGPT and Claude in the browser. | [maskera.dev/en/services](https://maskera.dev/en/services) | | Local proxy with MCP | Every prompt and tool output from your agent must be masked, and several clients should share one model and one session vault. | npx -y @maskera/mcp proxy \--root . | | MCP over stdio | Your client has no custom API URL and the agent reads and writes local files. | npx -y @maskera/mcp \--root . \--no-raw-restore | | Guard (hooks and pipes) | You want to block PII in agent hooks (exit 2) or redact Unix pipes. | npx -y @maskera/mcp guard | | npm SDK | You embed Swedish masking inside your own web app or Node service. | npm install maskera @huggingface/transformers | ![Diagram of Maskera's two layers: your text is split between rules for fixed-format data and a Swedish AI model for free text, then merged into masked text.](https://maskera.dev/layers.svg) [See exactly what is masked](https://maskera.dev/en/privacy#vad-maskeras) · [Open full size](https://maskera.dev/layers.svg) ## Quickstart One command starts a local proxy, checks that nothing leaks, and runs your agent through it. The background service and client installer are in the @maskera/mcp reference. Terminal ``` npx -y @maskera/mcp wrap -- claude ``` ## Markdown, llms.txt, and built-in skill Every page on [maskera.dev](https://maskera.dev/en) has a plain Markdown sibling via Accept: text/markdown or a .md suffix (for example [/en/docs.md](https://maskera.dev/en/docs.md) and [/en/docs/mcp.md](https://maskera.dev/en/docs/mcp.md)). For a ready-made coding-agent prompt, see [/setup-prompt.md](https://maskera.dev/setup-prompt.md) and the full index at [/llms.txt](https://maskera.dev/llms.txt). - The MCP server also serves the full workflow skill directly as resource maskera://skills/maskera/SKILL.md and prompt maskera-workflow. - Pass \--no-raw-restore when an agent may read and write local files without ever pulling raw PII back into chat. ## Read next - [@maskera/mcp →Proxy, MCP server and hook for AI agents.](https://maskera.dev/en/docs/mcp) - [Client guides →Ready-made steps for Claude, Codex, Cursor and more.](https://maskera.dev/en/docs/clients) - [SDK & operations →Masking in your own TypeScript and JavaScript code.](https://maskera.dev/en/docs/sdk) - [Troubleshooting →Common issues and what local masking does not cover.](https://maskera.dev/en/docs/troubleshooting) - [Agent setup prompt (setup-prompt.md)](https://maskera.dev/setup-prompt.md) - [Machine-readable index (llms.txt)](https://maskera.dev/llms.txt) - [@maskera/mcp on npm](https://www.npmjs.com/package/@maskera/mcp) - [maskera on npm](https://www.npmjs.com/package/maskera) - [Source code on GitHub](https://github.com/joelhagvall/maskera) - [Model on Hugging Face](https://huggingface.co/joelhagvall/maskera-sv-ner) --- # @maskera/mcp reference > Reference for @maskera/mcp: local LLM proxy, MCP tools for PDF/Word/Excel, Streamable HTTP /mcp, policy flags, guard hooks, install, and doctor. > > Canonical: https://maskera.dev/en/docs/mcp (en) · sv: https://maskera.dev/docs/mcp · Markdown: https://maskera.dev/en/docs/mcp.md · Overview for agents: https://maskera.dev/llms.txt One npm package that masks what your AI agent sends and reads, locally on your machine. It runs as a proxy, an MCP server, or a hook. [Overview](https://maskera.dev/en/docs) · [@maskera/mcp](https://maskera.dev/en/docs/mcp) · [Client guides](https://maskera.dev/en/docs/clients) · [SDK & operations](https://maskera.dev/en/docs/sdk) · [Troubleshooting](https://maskera.dev/en/docs/troubleshooting) You know it worked when Ask your agent to call maskera\_status. The reply lists your allowed folders and the active policy. ## Streamable HTTP (/mcp) and stdio Running maskera-mcp proxy serves both the LLM proxy and a Streamable HTTP MCP endpoint at [http://127.0.0.1:8787/mcp](http://127.0.0.1:8787/mcp). Connected clients share the warm AI model, the local in-memory session vault, and the live inspector at /\_maskera. Clients that only support stdio can launch npx -y @maskera/mcp with no background daemon. Terminal ``` # Warm local service: LLM proxy + Streamable HTTP MCP + live inspector npx -y @maskera/mcp proxy --root /path/to/workspace # Tighten policy per MCP connection via query parameters # http://127.0.0.1:8787/mcp?no_raw_restore=1 # http://127.0.0.1:8787/mcp?read_only=1&no_raw_restore=1 # http://127.0.0.1:8787/mcp?approval_mode=browser ``` ## MCP tools | Tool | Purpose | Policy / boundary | | --- | --- | --- | | maskera\_list\_files | List regular files inside allowed \--root directories without reading contents. | Confined to \--root; external symlinks are skipped. | | maskera\_search\_files | Search local text, PDF, DOCX, and XLSX files and redact every matching line before returning. Supports searching by placeholders such as `[NAMN_1]`. | No raw personal data reaches the chat. | | maskera\_read\_file | Read a local text, PDF, DOCX, or XLSX file and return redacted text + session\_id. | Originals stay in local RAM only. | | maskera\_redact\_file | Write a redacted copy of a local PDF, DOCX, XLSX, or text file on disk. PDF pages with matches are re-rendered as images and metadata is stripped. | Hidden in \--read-only; blocks scanned PDF pages without a text layer. | | maskera\_write\_file | Restore placeholders from session\_id and write directly to the file without showing the personal data in chat. | Hidden in \--read-only; requires overwrite: true to replace existing files. | | maskera\_redact | Redact text locally with auto (AI + rules) or rules, profile, and custom\_terms. | include\_map: true is blocked by \--no-raw-restore and gated by approval mode. | | maskera\_restore | Restore placeholders in text from session\_id or an explicit map. | Hidden by \--no-raw-restore; paused in browser/native approval mode. | | maskera\_list\_sessions | List active sessions and entity counts by label. | Never returns raw values. | | maskera\_clear\_session | Erase a session restore map from RAM immediately. | Hidden in \--read-only. | | maskera\_status | Report model status, cache stats, active sessions, allowed roots, and policy. | Read-only status check. | | maskera\_resume | Complete a paused approval request after deciding in /\_maskera. | Exposed only in \--approval-mode browser. | ## Scoped policies and approval modes URL query parameters on /mcp can only tighten server defaults, never weaken them. | Flag / query param | Effect | Recommended for | | --- | --- | --- | | \--no-raw-restore / ?no\_raw\_restore=1 | Hides and blocks maskera\_restore and include\_map: true. Agents can still restore files directly to disk with maskera\_write\_file. | Default for agents working on sensitive files. | | \--read-only / ?read\_only=1 | Hides and blocks maskera\_write\_file and maskera\_clear\_session. | Read-only analysis agents. | | \--approval-mode browser / ?approval\_mode=browser | Pauses maskera\_restore and include\_map: true and shows Approve / Decline controls in [http://127.0.0.1:8787/\_maskera](http://127.0.0.1:8787/_maskera). | Human confirmation before any raw PII enters chat. | | \--approval-mode native | Asks the user in the client through MCP elicitation. Fails closed if the client does not support it. | Clients with native MCP elicitation support. | ## Built-in prompts, resources, and skill The MCP server ships Maskera workflow guidance directly over the protocol so clients need no separate skill install. - Resource maskera://skills/maskera/SKILL.md serves the complete operating guide as text/markdown. - Resource maskera://status returns live engine, policy, and session status as JSON. - Prompt maskera-workflow accepts optional profile (general or clinical) and custom\_terms. - Prompt maskera-redact-file guides a safe read, draft, and local restore file roundtrip. ## Wrap, service, guard, install, and doctor The background service uses launchd on macOS and systemd on Linux. | Environment variable | Default | Purpose | | --- | --- | --- | | MASKERA\_MCP\_ROOTS | Current directory | Path-delimited allowed directories for file tools. | | MASKERA\_MCP\_MODE | auto | auto (AI + rules) or rules (deterministic rules only). | | MASKERA\_MCP\_NO\_RAW\_RESTORE | 0 | Set to 1 to block raw PII export into model context. | | MASKERA\_MCP\_READ\_ONLY | 0 | Set to 1 to disable file writes and session clears. | | MASKERA\_MCP\_APPROVAL\_MODE | automatic | automatic, browser, or native. | | MASKERA\_MODEL\_PATH + MASKERA\_ALLOW\_REMOTE\_MODELS=0 | Hugging Face cache | Load a local ONNX model directory completely offline. | Terminal ``` # Start local proxy + verify + launch agent in one terminal npx -y @maskera/mcp wrap --open -- claude # Install or check a persistent local background service (127.0.0.1:8787) npx -y @maskera/mcp service install --root . --no-raw-restore npx -y @maskera/mcp service status # Configure client + guard hook + save zero-PII receipt (maskera-setup-receipt/v1) npx -y @maskera/mcp install claude-code --root . --no-raw-restore \ --apply --with-hook --receipt ./maskera-receipt.json # Redact a PDF, Word, Excel, or text file locally on disk npx -y @maskera/mcp redact journal.pdf -o journal.masked.pdf npx -y @maskera/mcp guard --file journal.pdf # Block PII in hooks (exits 2 on match, prints counts only) echo '{"prompt":"Ring 070-174 06 58"}' | npx -y @maskera/mcp guard # Self-test local engine, roots, proxy, and live /mcp npx -y @maskera/mcp doctor --root . --json ``` ## Read next - [Overview →Pick a mode and check that masking works.](https://maskera.dev/en/docs) - [Client guides →Ready-made steps for Claude, Codex, Cursor and more.](https://maskera.dev/en/docs/clients) - [SDK & operations →Masking in your own TypeScript and JavaScript code.](https://maskera.dev/en/docs/sdk) - [Troubleshooting →Common issues and what local masking does not cover.](https://maskera.dev/en/docs/troubleshooting) - [Agent setup prompt (setup-prompt.md)](https://maskera.dev/setup-prompt.md) - [Machine-readable index (llms.txt)](https://maskera.dev/llms.txt) - [@maskera/mcp on npm](https://www.npmjs.com/package/@maskera/mcp) - [maskera on npm](https://www.npmjs.com/package/maskera) - [Source code on GitHub](https://github.com/joelhagvall/maskera) - [Model on Hugging Face](https://huggingface.co/joelhagvall/maskera-sv-ner) --- # Client guides > Step-by-step setup for AI clients such as Claude Code, Codex, and Cursor, with a made-up Swedish data verification test. > > Canonical: https://maskera.dev/en/docs/clients (en) · sv: https://maskera.dev/docs/klienter · Markdown: https://maskera.dev/en/docs/clients.md · Overview for agents: https://maskera.dev/llms.txt Exact steps and commands per client. Every configuration can also be written or previewed with npx -y @maskera/mcp install . [Overview](https://maskera.dev/en/docs) · [@maskera/mcp](https://maskera.dev/en/docs/mcp) · [Client guides](https://maskera.dev/en/docs/clients) · [SDK & operations](https://maskera.dev/en/docs/sdk) · [Troubleshooting](https://maskera.dev/en/docs/troubleshooting) Let your agent set up Maskera [Open llms.txt](https://maskera.dev/llms.txt) You know it worked when Type a made-up address such as provnamn.maskera@example.com. The inspector at [http://127.0.0.1:8787/\_maskera](http://127.0.0.1:8787/_maskera) should show `[EPOST_1]` in what was sent. ## Claude Desktop (local proxy) Start the proxy first and leave it running. Choose Help -> Troubleshooting -> Enable Developer Mode, then Developer -> Configure Third-Party Inference. Select third-party inference with Static API key, set base URL [http://127.0.0.1:8787](http://127.0.0.1:8787) (without /v1), enter your Anthropic API key, and change the auth scheme to x-api-key (Anthropic rejects the default Bearer scheme). Click Apply Changes, then Save & Restart. - Requests are billed to your Anthropic API key rather than a Claude plan. - While the proxy is stopped, Desktop fails instead of sending unmasked text. - To switch back, pick the Anthropic sign-in option on the sign-in screen. Terminal ``` npx -y @maskera/mcp proxy --root /path/to/your/files ``` ## Claude Code (proxy or MCP) With the proxy, every prompt and tool output is masked automatically. For local files over MCP, connect either to the warm Streamable HTTP /mcp endpoint or directly over stdio. Terminal ``` # Proxy (masks full chat + tool outputs) npx -y @maskera/mcp proxy --root . ANTHROPIC_BASE_URL=http://127.0.0.1:8787 claude # Or warm Streamable HTTP MCP blocking raw PII export claude mcp add --transport http maskera 'http://127.0.0.1:8787/mcp?no_raw_restore=1' # Or standalone stdio MCP claude mcp add maskera -- npx -y @maskera/mcp --root . --no-raw-restore ``` ## Codex (API key or ChatGPT account) With an OpenAI API key, Codex routes straight through the local proxy. If you sign in with a ChatGPT account, Codex requires HTTPS for its base URL, so use the MCP server instead. Terminal ``` # With OpenAI API key (proxy) npx -y @maskera/mcp proxy --root . OPENAI_BASE_URL=http://127.0.0.1:8787/v1 codex # Signed in with ChatGPT account (MCP stdio) codex mcp add maskera -- npx -y @maskera/mcp --root . --no-raw-restore # Or connect to an already running proxy over Streamable HTTP codex mcp add maskera --url 'http://127.0.0.1:8787/mcp?no_raw_restore=1' ``` ## Cursor Run the installer inside your project folder to merge the Maskera entry into .cursor/mcp.json without touching your other servers. Terminal ``` # Write .cursor/mcp.json automatically (stdio) npx -y @maskera/mcp install cursor --root . --no-raw-restore # Or connect to a running warm proxy (/mcp) npx -y @maskera/mcp install cursor --transport http --no-raw-restore ``` ## OpenCode and T3 Code Both OpenCode (opencode.json under mcp.servers) and T3 Code support stdio and Streamable HTTP through the same installer. Terminal ``` # OpenCode (merges into opencode.json) npx -y @maskera/mcp install opencode --root . --no-raw-restore # T3 Code (prints ready-to-paste JSON) npx -y @maskera/mcp install t3-code --root . --no-raw-restore ``` ## Test with made-up data Terminal ``` # Run automated diagnostics npx -y @maskera/mcp doctor --root . # Open local live inspector and approvals view open http://127.0.0.1:8787/_maskera ``` ## Read next - [Overview →Pick a mode and check that masking works.](https://maskera.dev/en/docs) - [@maskera/mcp →Proxy, MCP server and hook for AI agents.](https://maskera.dev/en/docs/mcp) - [SDK & operations →Masking in your own TypeScript and JavaScript code.](https://maskera.dev/en/docs/sdk) - [Troubleshooting →Common issues and what local masking does not cover.](https://maskera.dev/en/docs/troubleshooting) - [Agent setup prompt (setup-prompt.md)](https://maskera.dev/setup-prompt.md) - [Machine-readable index (llms.txt)](https://maskera.dev/llms.txt) - [@maskera/mcp on npm](https://www.npmjs.com/package/@maskera/mcp) - [maskera on npm](https://www.npmjs.com/package/maskera) - [Source code on GitHub](https://github.com/joelhagvall/maskera) - [Model on Hugging Face](https://huggingface.co/joelhagvall/maskera-sv-ner) --- # SDK and operations > Mask Swedish personal data in browsers and Node.js with maskera and @maskera/core: clinical profile, custom rules, ONNX self-hosting, and production checklist. > > Canonical: https://maskera.dev/en/docs/sdk (en) · sv: https://maskera.dev/docs/sdk · Markdown: https://maskera.dev/en/docs/sdk.md · Overview for agents: https://maskera.dev/llms.txt Use maskera (rules + 68 MB Swedish AI model) or @maskera/core (rules only, zero dependencies) directly in your own TypeScript or JavaScript code. [Overview](https://maskera.dev/en/docs) · [@maskera/mcp](https://maskera.dev/en/docs/mcp) · [Client guides](https://maskera.dev/en/docs/clients) · [SDK & operations](https://maskera.dev/en/docs/sdk) · [Troubleshooting](https://maskera.dev/en/docs/troubleshooting) You know it worked when The example below sends text without names or personnummer to the model, and restore(answer) brings back the exact original. ## Pick a package Both packages share the same synchronous rule engine and restore map. maskera re-exports everything from @maskera/core. Both run in the browser (WASM or WebGPU) and in Node 18+. | Package | Includes | Best when | | --- | --- | --- | | maskera + @huggingface/transformers | Deterministic Swedish rules + the maskera-sv-ner ONNX model (68 MB in q4, 100 MB in q8). | Free-form Swedish text with names, street addresses, places, and organisations. | | @maskera/core | Format and check-digit rules only, zero dependencies, synchronous. | Structured logs, constrained runtimes, or when you want no model weights. | ``` npm install maskera @huggingface/transformers ``` JS / TS ``` import { createNerRecognizer, redactWithNer } from "maskera" const recognizer = createNerRecognizer() const { text, restore } = await redactWithNer( "hej jag heter anna karlsson, personnummer 19900101-2385, och bor i uppsala", { recognizer }, ) // text: "hej jag heter [NAMN_1], personnummer [PERSONNUMMER_1], och bor i [PLATS_1]" const answer = await askAI(text) restore(answer) ``` ## Core flow, clinical profile, and custom detectors Create one recognizer at startup and reuse it across calls. For Swedish healthcare text, profile: "clinical" retains doses, measurements, and care terms while masking personal data. Add custom patterns with regexDetector. TypeScript ``` import { createNerRecognizer, hybridDefaultDetectors, redactWithNer, regexDetector, } from "maskera" const recognizer = createNerRecognizer() // Custom patterns are added to the built-in rules, not used instead of them const caseIdDetector = regexDetector("ARENDE", /(? Resolve common issues with @maskera/mcp and maskera: 502 fail-closed, Codex with ChatGPT login, offline models, loopback protection, and known boundaries. > > Canonical: https://maskera.dev/en/docs/troubleshooting (en) · sv: https://maskera.dev/docs/felsokning · Markdown: https://maskera.dev/en/docs/troubleshooting.md · Overview for agents: https://maskera.dev/llms.txt Common issues, why Maskera blocks rather than silently forwarding unredacted text, and where local masking stops. [Overview](https://maskera.dev/en/docs) · [@maskera/mcp](https://maskera.dev/en/docs/mcp) · [Client guides](https://maskera.dev/en/docs/clients) · [SDK & operations](https://maskera.dev/en/docs/sdk) · [Troubleshooting](https://maskera.dev/en/docs/troubleshooting) First step when debugging Run npx -y @maskera/mcp doctor \--root . to see which layer failed (Node version, directory access, ONNX model, or local proxy). ## Common errors and fixes | Symptom | Cause | Fix | | --- | --- | --- | | Proxy returns 502 | Local NER failed to run or the upstream API is unreachable. | Check stderr or run doctor. If you only want deterministic rules, pass \--rules-only. | | Codex with ChatGPT login rejects [http://127.0.0.1:8787](http://127.0.0.1:8787) | ChatGPT sign-in requires HTTPS for a custom base URL. | Use the MCP server (codex mcp add maskera -- npx -y @maskera/mcp \--root .) instead of the proxy. | | Claude Desktop gets 401 from Anthropic | Auth scheme is still set to Bearer. | Switch auth scheme to x-api-key and verify base URL is [http://127.0.0.1:8787](http://127.0.0.1:8787) without /v1. | | HTTP 403 on /\_maskera or /mcp | Host or Origin header does not match the loopback listener. | Always open [http://127.0.0.1:8787/\_maskera](http://127.0.0.1:8787/_maskera) directly and call /mcp without a foreign Origin header. | | Access denied on maskera\_read\_file | The path or a symlink points outside \--root. | Start with the right \--root (repeatable for multiple folders). | | maskera\_restore is missing or rejected | The server runs with \--no-raw-restore or ?no\_raw\_restore=1. | Use maskera\_write\_file to restore directly to disk, or \--approval-mode browser. | ## Running completely offline When your workstation or server cannot reach Hugging Face, place the model directory on local disk and disable remote fetches. Terminal ``` # Install the package and download the model once, pinned to the published revision npm install -g @maskera/mcp hf download joelhagvall/maskera-sv-ner onnx/model_q4.onnx config.json \ tokenizer.json tokenizer_config.json special_tokens_map.json \ --revision e0d5d017383c2732c5cc3c962fd1afdd73bb8035 \ --local-dir /opt/models/maskera-sv-ner-v24 # Then run with no network access MASKERA_MODEL_PATH=/opt/models \ MASKERA_MODEL_ID=maskera-sv-ner-v24 \ MASKERA_ALLOW_REMOTE_MODELS=0 \ maskera-mcp doctor --root . ``` ## Limitations - Maskera is built for Swedish (and mixed Swedish/English) text. Other languages are only partially covered. - Images and scanned PDFs must be converted to text via OCR before passing through Maskera. - A neural model can miss unusual names or typos (see measured numbers on [/en/accuracy](https://maskera.dev/en/accuracy)). Add known client names and case IDs via \--custom-term. - A skill guides agent behaviour but can be bypassed if the agent has unrestricted shell tools. Hard enforcement requires the local proxy or restricting file access to Maskera MCP. ## Read next - [Overview →Pick a mode and check that masking works.](https://maskera.dev/en/docs) - [@maskera/mcp →Proxy, MCP server and hook for AI agents.](https://maskera.dev/en/docs/mcp) - [Client guides →Ready-made steps for Claude, Codex, Cursor and more.](https://maskera.dev/en/docs/clients) - [SDK & operations →Masking in your own TypeScript and JavaScript code.](https://maskera.dev/en/docs/sdk) - [Agent setup prompt (setup-prompt.md)](https://maskera.dev/setup-prompt.md) - [Machine-readable index (llms.txt)](https://maskera.dev/llms.txt) - [@maskera/mcp on npm](https://www.npmjs.com/package/@maskera/mcp) - [maskera on npm](https://www.npmjs.com/package/maskera) - [Source code on GitHub](https://github.com/joelhagvall/maskera) - [Model on Hugging Face](https://huggingface.co/joelhagvall/maskera-sv-ner) --- # How well does Maskera find personal data? > How much of the names, places and addresses Maskera hides in Swedish text we did not write, compared with Presidio, swedish-pii and OpenAI Privacy Filter. > > Canonical: https://maskera.dev/en/accuracy (en) · sv: https://maskera.dev/traffsakerhet · Markdown: https://maskera.dev/en/accuracy.md · Overview for agents: https://maskera.dev/llms.txt Measured on Swedish text we did not write and the model never trained on: SUC 3.0 from the National Library of Sweden, SIC2 from Språkbanken Text, MultiCoNER v2 and ai4privacy. ## Short summary Share of values Maskera v24 hid in independent Swedish text, measured on 2026-11-30. Hidden means the value does not appear in the text that is sent, whatever label it got. Names · 12,198 of 12,570 97.0% Names in lowercase, as in chat · 4,480 of 4,829 92.8% Places · 5,592 of 5,749 97.3% Street addresses and postcodes · 5,221 of 5,482 95.2% Sentences without personal data that still got a hit · 473 of 10,800 4.4% ## Compared with other local tools The same texts and the same counting for all four. Higher is better in every column except the last, where lower is better. ### Names hidden in independent Swedish text Share of values hidden per tool in independent Swedish text | Tool | Size | Names | Lowercase names | Places | Addresses | Hit in a sentence without personal data | | --- | --- | --- | --- | --- | --- | --- | | Maskera v24 - Swedish model and format rules, local | 68 MB | 97.0% | 92.8% | 97.3% | 95.2% | 4.4% | | Microsoft Presidio - Swedish spaCy (sv\_core\_news\_lg) and Swedish ID rules | 245 MB | 72.3% | 71.4% | 97.1% | 47.0% | 2.5% | | swedish-pii 1.2 - Regular expressions and Swedish name lists | 5 MB | 55.3% | 0.3% | 82.7% | 77.3% | 7.0% | | OpenAI Privacy Filter - Multilingual model, q4 ONNX | 945 MB | 52.2% | 10.3% | 33.5% | 63.3% | 3.5% | Presidio's spaCy model is trained on SUC 3.0, one of the tests. ## The tests SUC 3.0, National Library of Sweden The test part of a manually annotated Swedish corpus: newspaper text, fiction and government text. People, places and organisations, in normal text and in lowercase. SIC2, Språkbanken Text 809 manually annotated sentences from Swedish blogs. Informal everyday Swedish with people, places and organisations, plus sentences without personal data. MultiCoNER v2, Swedish Short sentences from Swedish Wikipedia, all lowercase. Only person names count: places and organisations are labelled too loosely, with common words such as "ort" and "flygplats". ai4privacy openpii, Swedish Synthetic Swedish text from another company. Names, street addresses, postcodes, towns and email count. Phone, card and personal identity numbers do not count here, because many of the values are not valid Swedish formats. ## Why Swedish context matters Personal identity numbers are easy to find with ordinary rules. The hard part of Swedish text is words that can be both names and ordinary words or diagnoses. Bo ska bo i Boden. **The AI sees:** `[NAMN_1]` ska bo i `[PLATS_1]`. Masks the name Bo and town Boden, while leaving the verb bo (live) untouched. Liv har bott hela sitt liv i Uppsala. **The AI sees:** `[NAMN_1]` har bott hela sitt liv i `[PLATS_1]`. Masks the name Liv and Uppsala, while leaving the noun liv (life) untouched. Patienten har Parkinsons sjukdom, men Kalle Parkinson ringde. **The AI sees:** Patienten har Parkinsons sjukdom, men `[NAMN_1]` ringde. Masks the person Kalle Parkinson, while leaving the diagnosis Parkinsons sjukdom untouched. [Try the example in the demo](https://maskera.dev/en#testa) ## Worth knowing - None of the test texts are in Maskera's training, which uses only generated text. The base model KB-BERT was pretrained by the National Library of Sweden on broad Swedish text and may have seen the same source texts, but never the labels. - Maskera hits words in 4.4% of sentences without personal data. That is the price of finding lowercase and unusual names. - Personal identity numbers, organisation numbers, bankgiro and IBAN have no independent Swedish test text with valid values. They are found with format rules and check digits and are covered by the project's own tests on GitHub. - No automatic masking is error-free. Review the text yourself when a mistake could have serious consequences. Measured on CPU on 2026-11-30: Maskera v24 (q4), Presidio 2.2.366 with sv\_core\_news\_lg 3.8.0, swedish-pii 1.2.0 and OpenAI Privacy Filter (q4 ONNX). The test texts are fetched from Hugging Face and Språkbanken Text when the test runs. Scripts and checksums are on GitHub. - [Try the browser demo](https://maskera.dev/en#testa) - [Products](https://maskera.dev/en/services) - [SDK & operations](https://maskera.dev/en/docs/sdk) - [Industries](https://maskera.dev/en/industries) - [Maskera vs Presidio](https://maskera.dev/en/vs-presidio) - [Maskera vs Avidentifiera.se](https://maskera.dev/en/vs-avidentifiera) - [Full report and scripts on GitHub](https://github.com/joelhagvall/maskera/blob/main/docs/BENCHMARKS.md) --- # Maskera vs Microsoft Presidio for Swedish PII > Maskera vs Microsoft Presidio on Swedish text: 97.0% vs 72.3% names, 68 MB vs 245 MB, local ONNX vs Python, and where Presidio wins. > > Canonical: https://maskera.dev/en/vs-presidio (en) · sv: https://maskera.dev/jamfor/presidio · Markdown: https://maskera.dev/en/vs-presidio.md · Overview for agents: https://maskera.dev/llms.txt Across 23,980 zero-overlap Swedish texts, Maskera hides 97.0% of names and 95.2% of street addresses (68 MB), versus 72.3% of names and 47.0% of addresses for Microsoft Presidio (245 MB). Presidio has lower over-masking (2.5% vs 4.4%) and broader multi-language Python support. ## Measured on zero-overlap Swedish text Both systems ran on CPU across SUC 3.0 test, SIC2 Swedish blogs, MultiCoNER v2 Swedish persons, and ai4privacy Swedish rows (23,980 texts never seen in Maskera training). Presidio ran at version 2.2.366 with spaCy sv\_core\_news\_lg. Comparison of Maskera and Microsoft Presidio on independent Swedish corpora | Tool | Size | Names | Lowercase names | Places | Addresses | Hit in a sentence without personal data | | --- | --- | --- | --- | --- | --- | --- | | Maskera v24 | 68 MB | 97.0% | 92.8% | 97.3% | 95.2% | 4.4% | | Microsoft Presidio | 245 MB | 72.3% | 71.4% | 97.1% | 47.0% | 2.5% | Presidio's spaCy model is trained on SUC 3.0. Personnummer, organisationsnummer, bankgiro, and IBAN have no independent Swedish corpus and are handled by checksum-validated rules in both tools. ## Architecture and day-to-day fit Technical comparison between Maskera and Microsoft Presidio | Area | Maskera | Microsoft Presidio | | --- | --- | --- | | Language focus | Swedish-first (and mixed Swedish/English), trained for Swedish inflections and lowercase chat | Multi-language framework (20+ languages via spaCy or Transformers) | | Runtime and size | TypeScript/Node.js and browser (WebGPU/WASM), 68 MB q4 ONNX model | Python service/library, 245 MB for sv\_core\_news\_lg | | Ready-to-use tools | Browser extension (Chrome/Edge), local MCP server/proxy (@maskera/mcp), and npm SDK | Python SDK and Docker services (no built-in browser extension or MCP server) | | License | MIT (core, NER model, SDK, and @maskera/mcp) | MIT | ## When to choose each tool ### Choose Maskera when - Your text is Swedish and includes street addresses, lowercase chat names, or Swedish formats like bankgiro and apartment numbers. - Redaction needs to run directly in the browser, inside a Node/TypeScript app, or in front of coding agents like Claude Code and Codex via @maskera/mcp. - Non-technical staff need a ready Chrome/Edge extension with local PDF, Word, and Excel redaction and no servers to operate. ### Choose Microsoft Presidio when - You need PII detection across many languages beyond Swedish and English in a single pipeline. - Your backend is already Python and you want a server-side microservice with the lowest possible over-masking (2.5%). - You are building image and OCR redaction workflows on top of presidio-image-redactor. ## Code comparison TypeScript (maskera) ``` import { createNerRecognizer, redactWithNer } from "maskera" const recognizer = createNerRecognizer() const { text, restore } = await redactWithNer( "hej jag heter provnamn maskera, personnummer 19900101-2385, och bor i provbyn", { recognizer }, ) ``` Python (Microsoft Presidio) ``` from presidio_analyzer import AnalyzerEngine from presidio_anonymizer import AnonymizerEngine analyzer = AnalyzerEngine() anonymizer = AnonymizerEngine() results = analyzer.analyze(text=sample, language="sv") anonymized = anonymizer.anonymize(text=sample, analyzer_results=results) ``` Details and measurements verified as of 2026-12-01 against Maskera v24 and Microsoft Presidio 2.2.366. - [Try the browser demo](https://maskera.dev/en#testa) - [Accuracy](https://maskera.dev/en/accuracy) - [SDK & operations](https://maskera.dev/en/docs/sdk) - [Products](https://maskera.dev/en/services) - [Maskera vs Avidentifiera.se](https://maskera.dev/en/vs-avidentifiera) - [Guide: AI and GDPR](https://maskera.dev/en/guides/chatgpt-gdpr) - [Raw benchmark JSON on GitHub](https://github.com/joelhagvall/maskera/blob/main/docs/benchmark-independent-v24.json) --- # Maskera vs Avidentifiera.se for Swedish GDPR redaction > Comparison of Maskera and Avidentifiera.se for Swedish PII redaction: on-device browser extension, MCP, and MIT SDK versus cloud web UI with OCR and API. > > Canonical: https://maskera.dev/en/vs-avidentifiera (en) · sv: https://maskera.dev/jamfor/avidentifiera · Markdown: https://maskera.dev/en/vs-avidentifiera.md · Overview for agents: https://maskera.dev/llms.txt Maskera runs all redaction locally on the user's device (browser extension, @maskera/mcp, and open-source MIT SDK) so customer text never leaves the machine and no DPA is required with Maskera. Avidentifiera.se is a Swedish hosted service offering built-in OCR for scanned images and documents plus a REST/gRPC API. ## Side-by-side comparison Comparison between Maskera and Avidentifiera.se | Area | Maskera | Avidentifiera.se | | --- | --- | --- | | Where text is processed | 100% locally in the browser or local process (no hosted masking server) | Swedish cloud web app and API (on-premise available in Enterprise) | | GDPR DPA (PUB-avtal) | Not required for masked text because customer text never reaches Hägvall Labs AB | Applies when processing personal data via the cloud web UI or API | | Scanned images and OCR | No built-in OCR (handles text plus text layers in PDF, DOCX, and XLSX) | Built-in OCR for PDF, Word, and image files (JPG, PNG, TIFF, etc.) | | AI chats and coding agents | Chrome/Edge extension with in-place restore plus local MCP server/proxy for AI agents | Web document upload plus REST/gRPC API for backend integrations | | Pricing model | Free (20 AI maskings/mo + unlimited rules), Pro SEK 149/mo incl. VAT, Team SEK 249/user/mo excl. VAT (min 5). MIT SDK/MCP | Free (50 pages/day, 1 user), Standard (1,000 pages/day), Advanced (2,500 pages/day + API), Enterprise by quote | | Open source and benchmarks | MIT-licensed core, NER model, and reproducible benchmark on 23,980 Swedish texts | Proprietary commercial service (DevNordic AB) | Avidentifiera.se details verified on avidentifiera.se on 2026-12-01. ## When to choose each tool ### Choose Maskera when - Sensitive text must never leave the employee's machine to a third-party server just to be masked. - Staff use ChatGPT, Copilot, or Claude daily and want automatic local masking and in-browser restoration straight in the chat box. - Engineers want an open-source TypeScript/Node SDK or a local MCP server/proxy in front of coding agents. ### Choose Avidentifiera.se when - You need to redact scanned image-only PDFs, photos, or faxed documents with built-in OCR. - You want high-volume document batch redaction through a web portal or a managed REST/gRPC API. - You need visual redaction over image-based documents while preserving page layout. ## Why the data boundary matters under GDPR A cloud redaction vendor creates an extra third-party transfer of raw personal data before the AI model even runs, which normally requires vendor review and a Data Processing Agreement. On-device redaction removes that hop. - [Try the browser demo](https://maskera.dev/en#testa) - [Products](https://maskera.dev/en/services#jamfor) - [Brief for IT and DPO](https://maskera.dev/en/security#dpo) - [Privacy & transparency](https://maskera.dev/en/privacy) - [Maskera vs Presidio](https://maskera.dev/en/vs-presidio) - [Guide: AI and GDPR](https://maskera.dev/en/guides/chatgpt-gdpr) --- # How to mask Swedish personal data for ChatGPT and Copilot under GDPR > How to mask Swedish personal data before using ChatGPT or Copilot under GDPR: data minimization, pseudonymization, and on-device redaction without a DPA. > > Canonical: https://maskera.dev/en/guides/chatgpt-gdpr (en) · sv: https://maskera.dev/guider/chatgpt-gdpr · Markdown: https://maskera.dev/en/guides/chatgpt-gdpr.md · Overview for agents: https://maskera.dev/llms.txt You can use ChatGPT, Microsoft Copilot, and Claude on work text without exposing personal data by replacing names, personnummer, addresses, and contact details locally before sending. On-device masking keeps raw identifiers on your machine so the AI model only sees placeholders like `[NAMN_1]`. ## Why pasting personal data into AI chats conflicts with GDPR Pasting a name, personnummer, email address, or identifying combination of details into an external AI chat is personal data processing under GDPR. Consumer plans lack a Data Processing Agreement (DPA), and even enterprise AI plans are bound by GDPR data minimization (Art. 5(1)(c)): do not transmit personal data when the task does not require it. Summarizing an email, drafting a reply, or reviewing a case almost never requires the AI provider to know who the customer, patient, or applicant is. ## Pseudonymization vs anonymization in practice Reversible masking with a local restore map is technically pseudonymization: "Anna" becomes `[NAMN_1]` in the text sent to the AI, while your device keeps the mapping locally to restore the answer. Because the AI provider never receives the key, exposure drops sharply while the output stays immediately usable. Watch for indirect identifiers: a rare job title combined with a small town and date can still single out a person without a name. Add protected custom terms for client names and internal case IDs that must stay local. ## Three practical steps in the browser 1. **Mask the text or file locally:** Paste text into Maskera's browser demo or install the Chrome/Edge extension. Rules and the local Swedish NER model mask text plus PDF, Word, and Excel attachments on-device. 2. **Send only placeholders to the AI chat:** Review the highlights and send the prompt to ChatGPT, Copilot, or Claude. The restore map stays in local browser memory. 3. **Restore the reply locally:** The extension swaps `[NAMN_1]` and other placeholders back in your browser view when the model replies. ## Do you need a DPA with Maskera? No, not for the text you mask. Hägvall Labs AB never receives, stores, or processes your text or files because all detection and restoration run locally on your device (GDPR Art. 25, data protection by design). For Team customers using shared encrypted word lists and licences, the IT and DPO brief is available on the security page. ## Checklist for companies and public-sector teams - Publish a clear AI policy separating personal accounts from approved company tools. - Require on-device masking so the privacy tool does not introduce a new cloud transfer. - Deploy the browser extension centrally via MDM (Intune, Jamf, or Google Workspace) on the Team plan to cover shadow AI. - In Swedish public sector: evaluate secrecy rules (OSL) separately. - [Try the browser demo](https://maskera.dev/en#testa) - [Products](https://maskera.dev/en/services#tillagg) - [Industries](https://maskera.dev/en/industries) - [Brief for IT and DPO](https://maskera.dev/en/security#dpo) - [FAQ](https://maskera.dev/en/faq) - [Maskera vs Avidentifiera.se](https://maskera.dev/en/vs-avidentifiera) - [Maskera vs Presidio](https://maskera.dev/en/vs-presidio) --- # Security in Maskera > Maskera's security boundaries, network requests, pinned model artefacts, the public audit of the MCP server and private vulnerability reporting. > > Canonical: https://maskera.dev/en/security (en) · sv: https://maskera.dev/sakerhet · Markdown: https://maskera.dev/en/security.md · Overview for agents: https://maskera.dev/llms.txt All masking runs locally on your device. ## Data flow and network Your text and restoration key are never sent to Maskera. The rule layer has no network dependencies and the AI model runs locally in the browser or your own Node process. On first use, the npm package downloads the AI model (68 MB) once as a regular static file and caches it locally. You can also host the model files on your own server with no external requests. ## Brief for IT and data protection officers Summary of the six common questions during an internal review of Maskera Team. Print the page or save as PDF for your own ticket. Security and GDPR summary for IT and data protection officers | Question | Answer | | --- | --- | | Does text or personal data leave the device? | No. All masking and restoration run locally in the browser or your own process. Maskera never receives source text, files or restoration keys. | | Is a DPA required for masked text? | No for masking itself, because no text passes through Maskera's servers. On a Team licence, only the admin account, billing details and any shared protected word list are stored in the customer portal. | | How is the AI model verified? | Source code and model weights are open source (MIT). Every release is pinned to an exact Hugging Face revision and checked with SHA-256 before loading. | | How is the extension deployed centrally? | With the Team plan, the browser extension, offline licence and shared protected word list are deployed centrally through Intune, Jamf or Google Workspace. | | Licence model and pricing | Team costs SEK 249/user/month excl. VAT (minimum 5 users). Pay by card or annual invoice through Hägvall Labs AB (org. no. 559598-0110). | | Contact and verification | Send questions and invoice requests to [hej@maskera.dev](mailto:hej@maskera.dev). Audit results and independent benchmarks are published openly in this repository. | [See the Team plan](https://maskera.dev/en/services#jamfor) ## Verified model files Every npm release is pinned to an exact model version on Hugging Face, so weights cannot change quietly without a new package release. The build checks every model file with SHA-256. An unexpected or corrupted file stops the build instead of being used silently. ## Restoration is a security boundary The key contains the original values and must be treated as personal data. Do not log it or store it beside the masked text. restore() inserts real values wherever placeholder tokens occur. Do not restore untrusted output that will then be fetched as a URL, rendered as HTML or written to logs. Masking protects what is sent; restoration does not sanitise what comes back. A placeholder already present in the input is never allocated again. Planting `[PERSONNUMMER_1]` in the source text therefore cannot capture a real value. ## Audit of the MCP server Every version of @maskera/mcp is audited before it is published to npm. The audit installs the packed npm package, runs it in real AI agents and traces unique test values through all traffic, every log and every error path. It also plants deliberate faults in the protection to show that the tests really raise the alarm. Publishing stops if any requirement below is not met. Latest audit 2026-12-01: @maskera/mcp 0.5.3, model revision e0d5d017383c. Verdict: conditionally ready. Every automated requirement passed; what could not run is listed under Not tested in the audit. Leaked test values · 18 types on 33 surfaces 0 Planted faults that were caught 4 of 4 Leaks between sessions 0 Network requests in offline mode 0 Requirements a version must meet before it is published | Requirement | Result | | --- | --- | | No raw test value reaches the network, logs or error messages, not even URL- or Base64-encoded | Passed | | Sessions stay apart and the protection closes on errors instead of letting data through | Passed | | Deliberately sabotaged protection is caught by the tests | Passed | | The MCP protocol is followed, and nothing but the protocol is written to stdout | Passed | | Hidden characters, encodings, split streaming, prompt injection and concurrent sessions | Passed | | The packed npm package installs cleanly and contains no secrets or training data | Passed | | No network requests once the model is stored locally | Passed | | Real AI agents against the installed package | Passed | Clients tested: Claude Code, Codex CLI, OpenCode, a local language model through Ollama. Not tested in the audit: - Claude Desktop as an app. The protocol path is tested, but the app's interface cannot be driven automatically. - Cursor as an app. The configuration and hook are tested, but the app needs an interactive sign-in. - Paid cloud models. The audit makes no paid calls; they run only when you choose to. The requirements cover the code's security boundaries, not the AI model's accuracy. The MCP server protects only what passes through Maskera's own tools; to protect all traffic to the model, run the proxy. Measured accuracy is on [the accuracy page](https://maskera.dev/en/accuracy). Run the audit yourself. Clients that are not installed are reported as not tested. Terminal ``` # clone and build git clone https://github.com/joelhagvall/maskera.git cd maskera pnpm install pnpm build # fetch the model and check its SHA-256 node apps/demo/scripts/fetch-model.mjs # the whole audit and every requirement pnpm audit:full ``` [Read the full audit](https://github.com/joelhagvall/maskera/blob/main/packages/mcp/AUDIT.md) · [The result file as JSON](https://github.com/joelhagvall/maskera/blob/main/packages/mcp/audit-results.json) ## What counts as a vulnerability? Report privately if you find, for example: - original values or the restoration key leaking to the network, storage or logs contrary to the documented local processing - unexpected network requests beyond the documented one-time downloads of the model and runtime - XSS or injection in the demo at [maskera.dev](https://maskera.dev/en) - an exploitable supply-chain risk in the npm packages or model artefacts - an intentional construction that hides personal data from the detectors while a person or language model can still read it A model missing an unusual name or a rule lacking an edge case is normally a quality issue, not a vulnerability. Report such examples publicly so they can become regression cases. A reproducible intentional bypass, however, belongs in a private security report. ## Report a vulnerability privately Do not open a public issue for a possible security flaw. Use GitHub's private vulnerability reporting. Only the latest published versions of maskera, @maskera/core and @maskera/mcp receive security fixes, so update before reporting. [Submit a private security report](https://github.com/joelhagvall/maskera/security/advisories/new) · [Report a quality issue](https://github.com/joelhagvall/maskera/issues) ## Production operation The production guide covers secure integration, fallback to rules, logging, self-hosting, domain-specific test corpora and the production checklist. [Read the production guide](https://github.com/joelhagvall/maskera/blob/main/docs/PRODUCTION.md) This page covers the npm packages and open demo. The browser extension's local data handling and licence model are documented in the customer portal. [Read the extension privacy policy](https://app.maskera.dev/en/extension/privacy?utm_source=maskera_dev&utm_medium=referral&utm_content=security_extension_privacy) · [Industries](https://maskera.dev/en/industries) · [FAQ](https://maskera.dev/en/faq) · [About & contact](https://maskera.dev/en/about) --- # Industries > How Maskera is used in HR, healthcare, legal, the public sector and customer support: which personal data is swapped out and what stays for the AI. > > Canonical: https://maskera.dev/en/industries (en) · sv: https://maskera.dev/branscher · Markdown: https://maskera.dev/en/industries.md · Overview for agents: https://maskera.dev/llms.txt ## HR and recruiting CVs, salary data and references can be reviewed by AI without the candidate's name, personal identity number or contact details. Lönekartläggning enligt diskrimineringslagen (84 anställda): Sara Lindgren (991201-2391, sara.lindgren@example.com, tel 070-174 06 05), projektledare, 51 800 kr/mån (median för lika arbete 47 000 kr). Chef: Per Holmberg, 08-465 004 12. Flagga osakliga skillnader över 3 % och skriv förhandlingsunderlag. **The AI sees:** Lönekartläggning enligt diskrimineringslagen (84 anställda): `[NAMN_1]` (`[PERSONNUMMER_1]`, `[EPOST_1]`, tel `[TELEFON_1]`), projektledare, 51 800 kr/mån (median för lika arbete 47 000 kr). Chef: `[NAMN_2]`, `[TELEFON_2]`. Flagga osakliga skillnader över 3 % och skriv förhandlingsunderlag. **Masked:** Names, personal identity numbers, email and phone [Try the example: HR and recruiting →](https://maskera.dev/en#testa) ## Healthcare Journal notes and referrals. With the clinical profile in the npm package and the MCP server, diagnoses, doses and measurements stay while the patient is masked. Tre läkare hittar ingen orsak till tröttheten och fallen hos Anna Karlsson (850601-2387, Påhittsgatan 12B, Stockholm). 4 års provsvar: metformin sedan 2022, B12 290 → 220 → 165 → 145 (gräns 140). Vad missar vi? Anhörig: Lars Eriksson (070-174 06 71), anna.karlsson@example.com. **The AI sees:** Tre läkare hittar ingen orsak till tröttheten och fallen hos `[NAMN_1]` (`[PERSONNUMMER_1]`, `[ADRESS_1]`, `[PLATS_1]`). 4 års provsvar: metformin sedan 2022, B12 290 → 220 → 165 → 145 (gräns 140). Vad missar vi? Anhörig: `[NAMN_2]` (`[TELEFON_1]`), `[EPOST_1]`. **Masked:** Names, personal identity numbers, addresses and relatives [Try the example: Healthcare →](https://maskera.dev/en#testa) ## Legal Client matters, counterparties and payment details are summarised without sending the client or account to the AI. Granska uppsägningen av Johan Andersson (781101-2397) hos Kommun A, org.nr 202100-4748. Anställning 9 år, muntlig varning i mars, uppsagd i november utan omplaceringsutredning. Vilka brott mot LAS riskerar skadestånd? Ombud: advokat Leila Ahmadi, utbetalning bankgiro 991-2346. **The AI sees:** Granska uppsägningen av `[NAMN_1]` (`[PERSONNUMMER_1]`) hos `[ORGANISATION_1]`, org.nr `[ORGANISATIONSNUMMER_1]`. Anställning 9 år, muntlig varning i mars, uppsagd i november utan omplaceringsutredning. Vilka brott mot LAS riskerar skadestånd? Ombud: advokat `[NAMN_2]`, utbetalning bankgiro `[BANKGIRO_1]`. **Masked:** Names, organisation numbers and bankgiro [Try the example: Legal →](https://maskera.dev/en#testa) ## Public sector Applications and case handling. Your own formats, such as case numbers, can be added as custom rules. Jonas Wikström (20020301 2398, Påhittsvägen 21 i Stockholm, jonas.wikstrom@example.com) fick avslag på bostadsanpassning enligt 8 §. Sambo Elin Bergman intygar fallrisk i trappan. Jämför mot kammarrättsdomar sedan 2020, hitta eventuella brister i avslaget och skriv förslag till omprövning. **The AI sees:** `[NAMN_1]` (`[PERSONNUMMER_1]`, `[ADRESS_1]` i `[PLATS_1]`, `[EPOST_1]`) fick avslag på bostadsanpassning enligt 8 §. Sambo `[NAMN_2]` intygar fallrisk i trappan. Jämför mot kammarrättsdomar sedan 2020, hitta eventuella brister i avslaget och skriv förslag till omprövning. **Masked:** Names, personal identity numbers, addresses and email [Try the example: Public sector →](https://maskera.dev/en#testa) ## Customer support Tickets and billing complaints are summarised without customer contact or payment details, while amounts and deadlines stay. Kund Amir Haddad (070-174 06 58): Dubbeldragning 4 900 kr, kortnummer 4242 4242 4242 4242, återbetalningskonto IBAN SE42 8000 0890 1191 4616 8423. Säger upp företagsavtalet i dag om det inte löses före kl 15. Bedöm uppsägningsrisken, prioritera ärendet och skriv svarsutkast. **The AI sees:** Kund `[NAMN_1]` (`[TELEFON_1]`): Dubbeldragning 4 900 kr, kortnummer `[KORTNUMMER_1]`, återbetalningskonto IBAN `[IBAN_1]`. Säger upp företagsavtalet i dag om det inte löses före kl 15. Bedöm uppsägningsrisken, prioritera ärendet och skriv svarsutkast. **Masked:** Names, phone, card numbers and IBAN [Try the example: Customer support →](https://maskera.dev/en#testa) - [Brief for IT and DPO](https://maskera.dev/en/security#dpo) - [See the Team plan](https://maskera.dev/en/services#jamfor) - [FAQ](https://maskera.dev/en/faq) - [Accuracy](https://maskera.dev/en/accuracy) - [Guide: AI and GDPR](https://maskera.dev/en/guides/chatgpt-gdpr) - [Maskera vs Avidentifiera.se](https://maskera.dev/en/vs-avidentifiera) --- # FAQ > Answers about Maskera: does text leave your device, is a DPA needed, pricing for Pro and Team, supported AI chats and browsers, and MDM rollout. > > Canonical: https://maskera.dev/en/faq (en) · sv: https://maskera.dev/fragor · Markdown: https://maskera.dev/en/faq.md · Overview for agents: https://maskera.dev/llms.txt ## Data and data protection Is my text sent to Maskera? No. Masking runs locally in the browser, in the extension or in your own Node process. Maskera never receives the text or the key that restores it. Do we need a data processing agreement? Not for the text, because Maskera never receives it. Account and payment details in the customer portal are handled by Hägvall Labs AB under the extension privacy policy. Is masked text anonymous? No. Masking is pseudonymisation: names and numbers become placeholders, but the context can still point to a person, and the model can miss something. So treat the AI service as a recipient of personal data and keep your agreement with it as usual. Where is the key that restores the text? Only on your device. In the extension it lives in the browser's session storage and is cleared when the tab or the browser closes. Does Maskera store anything about me? [maskera.dev](https://maskera.dev/en) counts page views anonymously without cookies. The customer portal stores account and payment details for people who buy Pro or Team. The text you mask is never stored by us. Does Maskera help with GDPR when using Copilot or ChatGPT? Maskera supports data minimisation (GDPR Art. 5(1)(c)) and data protection by design (Art. 25): Swedish names, personal identity numbers, addresses and other identifiers are masked locally before text reaches Copilot, ChatGPT, Claude or an AI agent. It reduces exposure rather than replacing your agreement or risk assessment with the AI provider. ## How it works What if Maskera misses something? It can happen, especially with unusual names or noisy scanned text. Review it yourself when a mistake would matter, and report misses so they become test cases. The numbers are on the accuracy page. Which AI services does the extension work with? Copilot, ChatGPT, Claude, Gemini, Perplexity and Mistral, plus internal AI sites you turn on yourself. Can Maskera redact PDF, Word and Excel files? Yes, locally on your device in the browser extension, in the demo on [maskera.dev](https://maskera.dev/en) and in @maskera/mcp (CLI, MCP server and proxy). In PDF files personal data is burned out of the page image and metadata is stripped; in Word and Excel text, links and sheet names are masked. Scanned image-only PDFs without a text layer need OCR and are blocked instead of sent unmasked. Which browsers are supported? Chrome and Edge on desktop, both through the Chrome Web Store. Pro and Team need version 137 or later. Does it work without internet? Masking itself needs no network. The AI model is downloaded once when you start and is then kept on the device. Does it work in languages other than Swedish? Maskera is built for Swedish text. Rules such as email and card numbers work in any language, but the model is trained for Swedish names and places. Can AI agents use Maskera? Yes. The local proxy masks what you type in the chat, the MCP server masks files the agent reads, and guard stops prompts with personal data. See the guides at [/en/docs/clients](https://maskera.dev/en/docs/clients) for Claude, Codex and Cursor. How does Maskera compare to Microsoft Presidio on Swedish? On independent Swedish text held out from training, Maskera hides significantly more Swedish names, lowercase names and street addresses than Microsoft Presidio, swedish-pii and OpenAI Privacy Filter, using a smaller on-device model that runs in the browser, extension, @maskera/mcp or Node.js. See full numbers and methodology at [/en/accuracy](https://maskera.dev/en/accuracy). ## Pricing and buying What does it cost? Free masks identity numbers, phone numbers and other fixed formats without limit, and names and addresses with the AI model 20 times a month. Pro costs SEK 149 a month including VAT, with 7 days free. Team costs SEK 249 per user and month excluding VAT, from 5 users. The agent tools and npm packages are free and open source. What is the difference between Pro and Team? Pro is for one person: unlimited AI masking and your own protected words. Team adds a shared word list for the whole organisation, central deployment and rollout support. How do I cancel Pro? Cancel in the customer portal before the next charge. There is no lock-in. Can we pay by invoice? Yes, Team can be paid by annual invoice. Email [hej@maskera.dev](mailto:hej@maskera.dev) and we will send one. How do we roll the extension out to the whole organisation? With Team you deploy the extension in Chrome and Edge through Intune, Jamf or Google Workspace, together with the licence and the shared word list. We send a ready-made template. More questions? [Email hej@maskera.dev](mailto:hej@maskera.dev) · [Products](https://maskera.dev/en/services) · [Industries](https://maskera.dev/en/industries) · [About & contact](https://maskera.dev/en/about) · [Guide: AI and GDPR](https://maskera.dev/en/guides/chatgpt-gdpr) · [Maskera vs Presidio](https://maskera.dev/en/vs-presidio) --- # Privacy & transparency > See what Maskera does, what leaves the device, how the Swedish AI model was trained and which personal data it can miss. > > Canonical: https://maskera.dev/en/privacy (en) · sv: https://maskera.dev/integritet · Markdown: https://maskera.dev/en/privacy.md · Overview for agents: https://maskera.dev/llms.txt ## How does it work? - You write: “Bo Ek bor i Boden.” Maskera finds the name and the place. - Before the text is sent, they are swapped for placeholders: “`[NAMN_1]` bor i `[PLATS_1]`.” That is all the AI service sees. - The AI service replies with the same placeholders. Maskera swaps them back on your device, using a key that never leaves it. - Two things find the data. Rules catch fixed formats such as personal identity numbers, phone numbers and email. A small Swedish AI model catches names, places, organisations and addresses in ordinary text. Both run in the browser or in your own Node process. ## What is masked? The complete maskera npm package and the browser extension combine fixed rules with the Swedish AI model. ### AI model: free text Found from context. Accurate on everyday Swedish, though unusual names or phrasing can still slip through. - Names NAMN - Places PLATS - Organisations ORGANISATION - Street addresses ADRESS ### Beyond the npm defaults - Vehicle registration numbers REGNUMMER - Custom business formats CUSTOM ### Rules: fixed formats Swedish personal identity numbers are masked even if the check digit is mistyped, as long as the date shape is valid. Web links are caught when they start with http, https or www. - Swedish personal identity numbers PERSONNUMMER - Swedish coordination numbers SAMORDNINGSNUMMER - Swedish organisation numbers ORGANISATIONSNUMMER - Email addresses EPOST - Swedish phone numbers TELEFON - Swedish postcodes POSTNUMMER - Swedish apartment numbers LAGENHETSNUMMER - Bankgiro numbers BANKGIRO - PlusGiro numbers PLUSGIRO - Swedish IBANs IBAN - Payment card numbers KORTNUMMER - Context-labelled account numbers KONTONUMMER - Context-labelled medical record numbers JOURNALNUMMER - Context-labelled dates of birth FODELSEDATUM - Context-labelled property designations FASTIGHETSBETECKNING - IPv4 addresses IP\_ADRESS - Web links URL **Vehicle registration numbers:** The ready-made rule is enabled in the demo. It is optional in the npm package defaults because the same format can also be a booking or case number. **Custom formats:** Customer, order, invoice and case numbers can be added as custom rules when the organisation's formats are known. **Not included automatically:** Maskera does not classify all sensitive information. Dates, ages, usernames, diagnoses and other sensitive facts are not masked merely because the content is sensitive. Phone numbers written as words are not detected by the numeric rules either. ## How your text is processed - All masking runs locally on your device (browser, extension or your own Node process). Text and restoration keys are never sent to Maskera. - The site's own analytics and hosting are described in the privacy policy. Text entered in the tool is never included. - The rule layer has no network dependencies. The npm package downloads the model and runtime once as static files and can be self-hosted (details on the security page). ## How the model was trained - **Trained on 100% synthetic Swedish text (v24).** The model is trained on 219,100 generated Swedish texts, with zero customer data or real personal information. An automated filter blocks personal identity numbers, account numbers, emails, phone numbers and real street addresses before training starts. [Read the technical data-protection policy](https://github.com/joelhagvall/maskera/blob/main/docs/TRAINING_DATA_PROTECTION.md). Every release ships with verifiable SHA-256 checksums for the training data and scripts in the [model card](https://huggingface.co/joelhagvall/maskera-sv-ner). - **Base model:** KB-BERT from the National Library of Sweden (CC0), pre-trained on public Swedish text. [See KB-BERT](https://huggingface.co/KBLab/bert-base-swedish-cased). - **The whole pipeline can be audited and rerun.** Every script for data generation, training and testing is open on GitHub. If a single training row changes, the check stops the build. ## Limitations - Known weak points include table-like dumps, OCR noise and data written as words, such as ‘zero seven zero’. Capital letters, misspellings and messy number formats are, however, included in the tests. [See test results, method and limitations](https://maskera.dev/en/accuracy) - Masking is an additional protection layer, not a guarantee. Names and places are found probabilistically and can be missed. Keep other controls in place when an error could have serious consequences. - Maskera supports data minimisation but does not guarantee regulatory compliance. The organisation using the tool remains the data controller. The complete technical disclosure and all source code are available on GitHub. [Read the full document](https://github.com/joelhagvall/maskera/blob/main/docs/TRANSPARENCY.md) · [Products](https://maskera.dev/en/services) · [Industries](https://maskera.dev/en/industries) · [FAQ](https://maskera.dev/en/faq) · [Security](https://maskera.dev/en/security) · [Privacy policy](https://maskera.dev/en/privacy-policy) · [Guide: AI and GDPR](https://maskera.dev/en/guides/chatgpt-gdpr) · [Maskera vs Avidentifiera.se](https://maskera.dev/en/vs-avidentifiera) --- # Test data in the demo > Verify the origin of Swedish personal identity numbers, phone numbers, accounts and other test values in Maskera's browser demo. > > Canonical: https://maskera.dev/en/test-data (en) · sv: https://maskera.dev/testdata · Markdown: https://maskera.dev/en/test-data.md · Overview for agents: https://maskera.dev/llms.txt Every person is fictional. Data in real formats comes from officially reserved test values. - **Swedish personal identity numbers:** 19900101-2385, 991201-2391, 850601-2387, 781101-2397, 020301-2398 and 640823-3234 come from the Swedish Tax Agency's open test identity numbers. [Verify with the Swedish Tax Agency](https://www.skatteverket.se/omoss/digitalasamarbeten/omvaraoppnadata/testpersonnummersomoppendata.4.5b35a6251761e6914202df9.html) - **Organisation numbers:** 202100-4748 belongs to the fictional Municipality A in the Swedish Tax Agency's Navet test documentation. [Open the test documentation](https://www7.skatteverket.se/portal-wapi/open/apier-och-oppna-data/utvecklarportalen/v1/getFile/tjanstebeskrivning-folkbokforingsuppgifter-for-offentliga-aktorer-v3/pdf/1.0.3/tjanstebeskrivning-folkbokforingsuppgift-offentliga-aktorer-v3.pdf) - **Phone numbers:** 070-174 06 05, 070-174 06 32, 070-174 06 58, 070-174 06 71 and 08-465 004 12 are in the Swedish Post and Telecom Authority's number ranges for books and films. [Verify with PTS](https://pts.se/internet-och-telefoni/telefonnummer-och-adressering/telefonnummer-till-bocker-och-filmer/) - **Cards, accounts and giro numbers:** 4242 4242 4242 4242 is Stripe's test card, SE42 8000 0890 1191 4616 8423 is Swedbank's test account and 991-2346 is Bankgirot's example value. [See every source in the repository](https://github.com/joelhagvall/maskera/blob/main/docs/TEST_DATA.md#approved-sources) - **Email and addresses:** All email addresses use IANA's reserved example.com domain. Påhittsgatan and Påhittsvägen are fictional. [Verify the example domains with IANA](https://www.iana.org/help/example-domains) [Try the test values in the demo](https://maskera.dev/en#testa) --- # Privacy policy > Privacy policy for maskera.dev: text is processed locally in the browser, hosting on Cloudflare with no analytics scripts and your rights. > > Canonical: https://maskera.dev/en/privacy-policy (en) · sv: https://maskera.dev/integritetspolicy · Markdown: https://maskera.dev/en/privacy-policy.md · Overview for agents: https://maskera.dev/llms.txt The text you mask is processed locally and is not sent to Maskera. This page describes the limited processing performed by the website itself. - **Data controller:** Hägvall Labs AB (Swedish company reg. no. 559598-0110) is the data controller for [maskera.dev](https://maskera.dev/en). Contact details are available at [hagvall-labs.com](https://hagvall-labs.com). - **Web analytics:** The website loads no tracking or analytics scripts in the browser. Aggregate HTTP-level traffic statistics are handled by Cloudflare without cookies or profiling. - **Hosting:** Cloudflare delivers the website (Workers and R2) and may process technical request data, such as IP addresses, to serve and protect the site. The text and restoration key are not included. - **Local setting:** Your light or dark theme choice is saved in the browser's localStorage. It is not a cookie and the value never leaves the device. - **Text entered in the tool:** The text and the key containing the original data are processed locally in the browser. They are not sent to us or any other service for masking. - **Your rights:** Contact us if you have questions about the website's processing or want to exercise your rights. Using the browser extension? [Read the extension privacy policy](https://app.maskera.dev/en/extension/privacy?utm_source=maskera_dev&utm_medium=referral&utm_content=privacy_extension_policy). [About & contact](https://maskera.dev/en/about) · [Contact details at hagvall-labs.com](https://hagvall-labs.com) Last updated 30 November 2026. --- # About Maskera > About Maskera: what the tool does, who is behind it (Hägvall Labs AB in Stockholm) and how to reach us at hej@maskera.dev. > > Canonical: https://maskera.dev/en/about (en) · sv: https://maskera.dev/om · Markdown: https://maskera.dev/en/about.md · Overview for agents: https://maskera.dev/llms.txt Maskera hides Swedish personal data locally before text reaches an AI service, log or analytics. ## What Maskera is It comes as a browser extension, for AI agents and as an npm package. Everything runs on your device. [How it works](https://maskera.dev/en/privacy) · [Products and pricing](https://maskera.dev/en/services) ## Who is behind it Maskera is developed and operated by Hägvall Labs AB (Swedish company reg. no. 559598-0110), a Swedish limited company in Stockholm founded by Joel Hägvall. The company is the data controller for [maskera.dev](https://maskera.dev/en). The source code, training pipeline and benchmarks are public on GitHub so the results can be reviewed and reproduced. [Privacy policy](https://maskera.dev/en/privacy-policy) ## Contact - **Email:** [hej@maskera.dev](mailto:hej@maskera.dev) for questions about the browser extension, licences, press and anything else. We answer in Swedish and English. - **Bugs and suggestions:** Open an issue in the source repository on GitHub: [https://github.com/joelhagvall/maskera/issues](https://github.com/joelhagvall/maskera/issues) - **Vulnerabilities:** Report privately through GitHub's vulnerability reporting. Scope and process are described on the security page. - **Company details:** Hägvall Labs AB, Swedish company reg. no. 559598-0110, Stockholm. Further contact details are available at [hagvall-labs.com](https://hagvall-labs.com). [Security page](https://maskera.dev/en/security)