common.skipToContent

Anonymizer Guide

Transform detected PII using various anonymization methods

After the Analyzer detects PII entities, the Anonymizer transforms them using operators like replace, mask, hash, or encrypt. Choose the right operator based on your use case.


Anonymization Operators

Choose the right operator based on your needs:

Replace

Replaces the entity with a placeholder text. The original value is lost.

John Doe → [PERSON]

Best for: Human-readable anonymized text

Mask

Partially hides the entity while keeping some characters visible for context.

john@email.com → j***@email.com

Best for: Maintaining partial readability

Redact

Completely removes the entity from the text, leaving no trace.

Contact John Doe at → Contact at

Best for: Complete removal of sensitive data

Hash

Creates a one-way cryptographic hash. Same input always produces the same output, but cannot be reversed.

John Doe → a3f2b1c4d5...

Best for: Data analysis while preserving uniqueness

EncryptReversible

Encrypts the entity using AES-256-GCM. Can be reversed using the same encryption key.

John Doe → [ENC:a3f2b1c4...]

Best for: Temporary anonymization with future restoration


Operator Comparison

OperatorReversiblePreserves FormatConsistent OutputUse Case
ReplaceNoNoYesSharing anonymized documents
MaskNoPartialYesCustomer support, logs
RedactNoNoYesLegal documents, FOIA
HashNoNoYes*Data analysis, deduplication
EncryptYesNoPer-keyTemporary anonymization

* Hash produces consistent output for the same input value


Using the Anonymizer

Step 1: Analyze First

Before anonymizing, you must analyze your text to detect PII entities. The anonymizer works on the results from the analyzer.

Step 2: Select Entities

Review and select which detected entities you want to anonymize:

  • Use checkboxes to select/deselect individual entities
  • Unselected entities will remain unchanged in the output
  • Click entity type badges to bulk select/deselect by type

Step 3: Choose Operator

Select the anonymization method:

  • Global operator: Applies the same method to all selected entities
  • Per-entity operator: Set different methods for different entity types

Step 4: Configure Options

Each operator has configuration options:

Replace Options
  • new_value - The replacement text (default: [ENTITY_TYPE])
Mask Options
  • masking_char - Character to use for masking (default: *)
  • chars_to_mask - Number of characters to mask
  • from_end - Mask from end instead of beginning
Hash Options
  • hash_type - Algorithm to use (default: sha256)
Encrypt Options
  • Requires an encryption key configured in Settings
  • Uses AES-256-GCM encryption

Step 5: Run Anonymization

  1. Click the Anonymize button
  2. Review the anonymized output
  3. Copy or download the result

Encryption & Deanonymization

The Encrypt operator enables reversible anonymization. You can restore original values using the same encryption key.

Setting Up an Encryption Key

  1. Go to Settings → Security
  2. Under "Encryption Keys," click Add Key
  3. Enter a name and your secret key (32+ characters recommended)
  4. Save the key securely - it's required for deanonymization

Key Security

Your encryption key is stored encrypted in your account. If you lose the key, encrypted data cannot be recovered.

Deanonymizing Text

  1. Go to the Deanonymize tab
  2. Paste text containing encrypted entities (e.g., [ENC:a3f2b1c4...])
  3. Select the encryption key used during anonymization
  4. Click Deanonymize
  5. The original values are restored

Token Costs

Anonymization operations consume tokens based on:

Cost = 1 + 0.2 × ops_count + 0.8 × encrypt_count + 0.1 × entities + 0.2 × text_k

Final = ceil(Cost × 0.5)

Where:

  • ops_count = number of anonymization operations
  • encrypt_count = number of encryption operations (higher cost)
  • entities = number of entities processed
  • text_k = text length in thousands of characters
OperationTypical Cost
Anonymize (apply only)1-5 tokens
Anonymize (full)2-15 tokens
Deanonymize1-4 tokens

Best Practices

Use Replace for documents that will be shared publicly
Use Mask when you need to maintain partial readability
Use Hash when analyzing data while preserving entity uniqueness
Use Encrypt only when you need to restore original values later
Store encryption keys securely - losing them means losing access to encrypted data
Test anonymization on a small sample before processing large datasets

Related Documentation

Last Updated: February 2026