rehydra logo

rehydra

Free

A zero-trust SDK for anonymizing PII locally before sending prompts to LLMs and seamlessly rehydrating the response.

FreeFree tier
Inputs: text, codeOutputs: text
Type
Open Source

About rehydra

Rehydra is an open-source zero-trust SDK designed to prevent accidental PII leakage in LLM prompts before they reach the model. It detects structured PII (emails, phones, IBANs, credit cards) via regex and soft PII (names, organizations, locations) using an on-device NER model running in ONNX format. Each detected value is replaced with a stable placeholder that persists across the session, allowing the LLM to maintain relational coherence without seeing real data. When needed, responses are rehydrated by restoring original values from an encrypted map. Rehydra integrates as a local proxy for AI coding tools like Claude Code and Cursor, as a browser extension for ChatGPT and Gemini, and as an OpenCode plugin, ensuring PII never leaves the user's machine.

Key Features

On-device PII detection using regex (emails, phones, IBANs, credit cards) and an ONNX-based NER model (names, organizations, locations)
Stable placeholder replacement that preserves relational context across messages
Session-persistent entity mapping for consistent pseudonyms
Encrypted rehydration to restore original values in responses
Local proxy for AI coding tools (Claude Code, Cursor, OpenAI/Anthropic-compatible clients)
Browser extension for anonymizing ChatGPT and Gemini interactions
OpenCode plugin integration for coding workflows

Pros & Cons

Pros
  • Zero-trust design: PII detection and replacement happen entirely on-device, no data leaves the machine
  • On-device NER model eliminates cloud calls for soft PII detection
  • Stable placeholders maintain conversational context and entity relationships
  • Open-source SDK with flexible integration options (proxy, browser extension, plugin)
  • Supports multiple LLM providers via compatible proxy interface
Cons
  • Proxy setup requires an Anthropic API key and does not support Claude Max/Pro OAuth subscriptions
  • Browser extension currently limited to ChatGPT and Gemini
  • Requires some technical configuration for integration with development tools
  • Not yet available for all LLM platforms or proprietary SDKs

Best For

Protecting PII when using AI coding assistants like Claude Code or CursorAnonymizing browser-based LLM interactions on ChatGPT and GeminiSecuring enterprise document processing workflows involving LLMsPreventing leakage of API keys and secrets in promptsEnabling safe use of LLMs in compliance-sensitive environments

FAQ

How does Rehydra prevent PII leakage?
Rehydra detects PII locally using regex and an on-device NER model, replaces detected values with stable placeholders before the prompt reaches the LLM, and rehydrates the response by restoring original values from an encrypted map when needed.
Does Rehydra send data to the cloud?
No, all detection runs on-device. PII never leaves the user's machine; only anonymized placeholders are sent to the LLM.
Which AI tools does Rehydra support?
Rehydra supports Claude Code, Cursor, and any OpenAI/Anthropic-compatible client via a local proxy. It also offers a browser extension for ChatGPT and Gemini, and an OpenCode plugin for coding workflows.