Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

becoolme/privacyfilter.app

Privacy Filter Online

English · 简体中文 · 繁體中文 · 日本語

A free, in-browser privacy remover that detects PII (names, emails, phone numbers, addresses, account numbers, dates, URLs, and secrets) and redacts it in one click. Powered by openai/privacy-filter running locally via Transformers.jsyour text never leaves the device.

Live site: privacyfilter.app

Features

  • 100% local inference — no servers, no uploads, no tracking
  • WebGPU accelerated, with WebAssembly fallback for older browsers
  • 8 PII categories detected at token level via BIOES tagging:
    • private_person · private_email · private_phone · private_address
    • account_number · private_date · private_url · secret
  • Image OCR + PII — scan screenshots with on-device Tesseract OCR, then mask sensitive regions
  • Multilingual UI — English, 简体中文, 繁體中文, 日本語
  • Static site — deploys anywhere (Cloudflare Pages, Vercel, Netlify, GitHub Pages)

Use Cases

  • AI prompt sanitization — privacy clean text before pasting into ChatGPT, Claude, or Gemini
  • Log & ticket redaction — strip customer data from bug reports before sharing
  • Safe document sharing — mask names, addresses, and account numbers in screenshots
  • Secret auditing — catch API keys accidentally committed to docs or chat threads

Tech Stack

Layer Choice
Framework Astro 5
Styling Tailwind CSS v4
ML runtime @huggingface/transformers (Transformers.js)
Model openai/privacy-filter
OCR tesseract.js
Deployment Cloudflare Workers / static hosting

Getting Started

Prerequisites

  • Node.js 20+
  • pnpm 9+

Install & run

pnpm install
pnpm dev

The first run downloads openai/privacy-filter weights (~50 MB) and caches them in the browser.

Build

pnpm build # outputs to ./dist
pnpm preview # preview the built site locally

Deploy (Cloudflare)

pnpm deploy # pnpm build && wrangler deploy

Configuration

Copy .env.example to .env and set optional analytics:

PUBLIC_ANALYTICS_DOMAIN=yourdomain.com
PUBLIC_ANALYTICS_SRC=https://analytics.example.com/script.js

Leave these blank to disable analytics entirely.

Browser Requirements

Browser Performance path
Chrome / Edge WebGPU (fastest)
Safari 17+ WebAssembly
Firefox WebAssembly

Requires SharedArrayBuffer. The site is served with Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp. These headers are configured by the Vite dev server (astro.config.mjs) and the Cloudflare Worker (src/worker.ts). If you deploy to a different host, make sure the same headers are applied to HTML responses.

Project Structure

src/
├── lib/
│ └── i18n.js # Locale data, SEO metadata, demo texts
├── pages/
│ └── [...locale].astro # Single template, 4 locale routes
└── styles/
 └── global.css # Tailwind v4 theme + custom utility classes

Routing uses Astro's rest-parameter dynamic route so /, /ja, /zh-hans, /zh-hant share one template.

FAQ

Is my text uploaded to a server? No. Inference runs entirely in your browser via Transformers.js. After the initial model download from Hugging Face, your text never leaves the device.

Why is the first detection slow? The first run downloads the model weights. Subsequent runs use the browser cache and are noticeably faster.

Can it replace a regex-based redactor? For natural-language text, a contextual model catches entities regex misses (multilingual names, free-form addresses). Combining both gives the best coverage.

Contributing

Issues and PRs are welcome. Please open an issue first for larger changes so we can discuss direction.

License

Released under the MIT License.

Third-party attributions for bundled dependencies (Transformers.js, tesseract.js, etc.) are listed in NOTICE. Model weights (openai/privacy-filter) are distributed under Apache-2.0 — see the model card for details.

Acknowledgments

AltStyle によって変換されたページ (->オリジナル) /