{
  "id": 22548010,
  "title": "Why I built a 100% offline, single-file PII scrubber for LLMs (zero dependencies)",
  "url": "https://urgent.news/2026/11/29/why-i-built-a-100-offline-single-file-pii-scrubber-for-llms-zero",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-29T09:31:45.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ringng/why-i-built-a-100-offline-single-file-pii-scrubber-for-llms-zero-dependencies-2np5"
  },
  "original_language": null,
  "account": "If you rely on ChatGPT, Claude, or Gemini for professional use, you may have encountered a frustrating limitation when pasting client contracts, invoices, or CSV files without risking exposure of sensitive data such as real names, emails, and budgets. Manually identifying and replacing these terms individually is not only time-consuming but also prone to errors. Conversely, numerous online PII scrubbers either operate as monthly SaaS subscriptions or mandate the transmission of confidential text to a third-party server, thereby undermining the very privacy objective.\n\nTo address this issue, I developed MaskBack – a client-side, single-file browser utility designed to mask sensitive data locally and subsequently restore the AI's response to match the original input word-for-word. You can experiment with the free web version at https://ringng.github.io/maskback/. The core mechanism of the reversible workflow operates as follows:\n\n1. Mask: Input your text by pasting or loading a sample contract. MaskBack automatically identifies emails, phone numbers, currency amounts, dates, identifiers, IPs, and any terms you specify, subsequently replacing them with deterministic tokens like [EMAIL_1], [AMOUNT_1], or [TERM_1].\n\n2. Prompt AI: Feed the masked text into any Large Language Model (LLM). Given that the tokens preserve the original structure and context, the AI can accurately summarize, rewrite, or analyze the content.\n\n3. Restore: Feed the AI's response back into MaskBack. Utilizing an in-memory mapping vault, the tool precisely swaps the tokens back to their original values.\n\nThe architecture of MaskBack has been meticulously crafted to uphold privacy guarantees. The entire system is encapsulated within a single standalone HTML file, devoid of any external content delivery networks (CDNs), analytics, or network calls. Consequently, you can verify the privacy assertion by opening DevTools (Network tab), switching to airplane mode, and confirming that the tool functions unaffected. The overlap resolution is managed through regex detection, ensuring that overlapping matches are handled seamlessly to prevent token interference between rounds. The in-memory vault stores the mappings exclusively within your active browser tab; clearing the session or closing the tab erases all data permanently.\n\nWhile the web version is accessible at no cost (limited to 500 words, three custom terms, and copy-paste functionality), I have also packaged a $9 one-time Pro version for users requiring unlimited length masking, support for RFC-4180 cell-safe .csv/.txt/.md files, customizable localStorage presets, and the ability to operate entirely offline through a standalone HTML file. Should you discover any regex edge cases or formatting anomalies, your feedback is greatly appreciated within the comments section.",
  "summary": "If you use ChatGPT, Claude, or Gemini for work, you’ve probably hit the same annoying bottleneck: pasting client contracts, invoices, or CSVs without leaking real names, emails, and budgets. Manually finding and replacing sensitive terms every time is tedious and error-prone. On the other hand, most online PII scrubbers are either monthly SaaS tools or require sending your confidential text to…",
  "summary_source": "publisher",
  "key_points": [
    "MaskBack is offline, single-file PII scrubber",
    "Masks sensitive data locally, restores AI response",
    "No dependencies, works in airplane mode"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}