cd /news/ai-tools/a-local-scrubber-for-text-you-re-abo… · home topics ai-tools article
[ARTICLE · art-115271] src=github.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

A local scrubber for text you're about to send to an LLM

A new open-source tool called Redact, available on GitHub, strips sensitive data such as names, emails, phone numbers, SSNs, card numbers, addresses, API keys, and database passwords from text before it is sent to an LLM, running entirely locally with no LLM involved. The tool uses regexes, checksums, a small NER model, and a merge layer to detect and redact or pseudonymize values, with the original values kept in a separate file that never leaves the machine. It supports blanking values as <PERSON> or swapping in stable placeholders like PERSON_001, and includes 12 test fixtures covering logs, résumés, chat, source code, medical, financial, and adversarial cases.

read2 min views1 publishedAug 29, 2026
A local scrubber for text you're about to send to an LLM
Image: Michielbdejong (auto-discovered)

A local scrubber for text you're about to send to an LLM.

Before you paste a log file, a résumé, or a support thread into an LLM, this tool strips out the sensitive parts first — names, emails, phone numbers, SSNs, card numbers, addresses, API keys, database passwords — and hands back a clean copy. It runs entirely on your machine with no LLM involved: a stack of regexes and checksums catches the structured stuff, a small NER model handles the fuzzier things like people and companies, and a merge layer reconciles them when they disagree. You can either blank each value out as <PERSON>

or swap in stable placeholders like PERSON_001

so the text still reads coherently, with the original values kept in a separate file that never leaves your machine. Most of the work went into not over-redacting — teaching it that "Django" in a skills list is a framework, not a person.

For how the detection actually works, see PIPELINE.md.

python -m venv redact_venv
source redact_venv/bin/activate
pip install -r requirements.txt
python -m spacy download en_core_web_sm

The GLiNER model (gliner_multi_pii-v1

, ~1.1 GB) downloads from Hugging Face on first run and is cached.

source env.sh          # thread-safety env vars — see the comments in the file

python -m redact notes.txt                 # -> notes.redacted.txt
python -m redact notes.txt -o clean.txt     # choose the output path
python -m redact notes.txt --pseudonymize   # -> notes.redacted.txt + notes.redacted.txt.map.json

--pseudonymize

also writes notes.redacted.txt.map.json

(label → original value). That file is sensitive — keep it local, never send it anywhere.

As a library:

from redact import redact_text

sanitized, counts, mapping = redact_text(text, language="en", pseudonymize=False)
python run_tests.py

12 fixtures in tests/

(logs, résumés, chat, source code, medical, financial, and adversarial "same shape, different meaning" cases). Each checks both directions: sensitive values must be gone, ordinary values must survive unchanged.

── more in #ai-tools 4 stories · sorted by recency
── more on @redact 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/a-local-scrubber-for…] indexed:0 read:2min 2026-08-29 ·