Docs

PII Masker

Replace PII with shape-valid, deterministic fake values.

Overview

Replaces PII with fake values that keep the same shape so masked exports still load and join. The mapping is deterministic given a seed.

Features

  • Shape-valid fakes.
  • Deterministic with seed.
  • Selectable entity types.
  • CSV, JSON, text.

Use cases

  • Preparing a test dataset.
  • Sharing a sample without exposing customers.

API reference

POST /api/v1/tools/pii-mask

Replace PII with shape-valid, deterministic fake values so masked exports still join and load. The real→fake mapping is returned separately.

Returns: The masked output, the real→fake entity mapping, and a count of masked values per entity.

Parameters

NameTypeRequiredDefaultDescription
input string Yes — The data to mask.
format string (csv|json|text) No "text" How to interpret the input.
entities string[] No — Restrict masking to these entity types. Valid: EMAIL, SSN, CREDIT_CARD, PHONE, IPV4, IBAN, URL, PERSON_NAME, PASSPORT, DOB. Defaults to EMAIL, SSN, CREDIT_CARD, PHONE, IPV4, IBAN, URL, PERSON_NAME.
seed string No — Deterministic seed for the pseudonymizer. Same seed + same input → same masked output. Defaults to "dmt".

Example

curl -X POST https://data-migration-tools.com/api/v1/tools/pii-mask \
  -H "Content-Type: application/json" \
  -d '{"input":"email,phone\nada@example.com,+15551234567","format":"csv","seed":"run-42"}'

See the full API reference for all examples and error codes.