Urgent.News

What's breaking now, across hundreds of outlets.

AI

Why I built a 100% offline, single-file PII scrubber for LLMs (zero dependencies)

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…

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.

To 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:

1. 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].

2. 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.

3. 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.

The 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.

While 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.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in AI

Moniepoint CEO warns AI could displace millions of white-collar workers

The Chief Executive Officer of Moniepoint, Tosin Eniolorunda, has raised concerns over the potential impact of artificial intelligence (AI) on white-collar employment, warning that millions of…

  • AI could displace millions of white-collar workers, warns Moniepoint CEO
  • Economic benefits of AI must be equitably distributed to address workforce displacement

Why Luxury Brands Are Selling a Future Without AI

As AI makes creativity cheaper, luxury brands may find their most valuable selling point is the increasingly rare human touch.

  • Luxury brands emphasize human craftsmanship over AI in ads.
  • AI use in high-end brand ads decreases consumer engagement.
  • Authenticity and human skill maintain luxury product allure.

More from Sunday, 29 November 2026 →