Skip to main content
Rehydra supports two closely related ways to protect sensitive text: pseudonymize for reversible workflows and anonymize for irreversible ones.

The Two Modes

Shared Processing Model

Both modes use the same high-level flow:
1

Detect

Rehydra runs enabled recognizers and optional NER to identify sensitive spans.
2

Resolve

Overlaps are resolved using type priority and confidence rules.
3

Replace

Original values are swapped for stable <PII .../> placeholders.
4

Store or discard

In pseudonymize mode Rehydra encrypts the mapping; in anonymize mode it does not keep one.

Placeholder Output

Rehydra uses XML-like placeholders so downstream systems can safely process the text while preserving structure.
When semantic enrichment is enabled, placeholders can include extra attributes:

Choosing the Right Mode

Use pseudonymize when:
  • You need to restore the original values later
  • You are building an application flow around rehydration
  • You want encrypted mappings for sessions or agent workflows
Use anonymize when:
  • You want irreversible protection
  • You are preparing text for one-way sharing or analysis
  • You do not want to manage keys or stored mappings
pseudonymize naturally connects to rehydration, encryption, and key management. anonymize is simpler, but it still depends on the same recognizers, type system, and configuration model.

Next Steps

Rehydration

Learn how reversible workflows restore original values.

Configuration

See which settings shape detection and output behavior.