Supported Data TypesToken Types

Token Types

How token types control the shape and structure of masked output — choosing the right token type for your data and downstream requirements.

Token types control how masked values are generated, independent of entity or format. The same input can produce different output shapes depending on which token_name you specify.

Available token types

Token TypeIntended UseExample InputExample Output
Default TokenGeneral textGeorgeFreTdf
Text TokenEmails, usernameskumar@ss.fss.comLEFQS@cTdqGVB2Ay
Numeric TokenNumeric-like values(408)-426-9989(07432)-29915-56713
Special TokenRandom-length outputjohn.doe@example.comxuLDKEM4bAXh8yIEY1L9
Person TokenNamesWilliamsCynthia
Date TokenDates6/12/19670001-06-22
State TokenUS state codesTNIL

Choosing a token type

ScenarioRecommended token type
Masking a namePerson Token (output is a realistic name)
Masking a phone or account numberNumeric Token (output preserves numeric shape)
Masking an emailText Token (output preserves email-like structure)
Masking a dateDate Token (output is a valid date)
Masking a US stateState Token (output is a valid state code)
General string with no format requirementsDefault Token
Variable-length outputSpecial Token

Token determinism

Masking is deterministic — the same input value with the same token type produces the same token within a namespace and policy. This means:

  • The same value always maps to the same token
  • Tokens can be used as stable pseudonymous identifiers
  • Joins and lookups on tokenized data work correctly

Token determinism is scoped to your namespace and policy. The same value masked under different namespaces or policies will produce different tokens.

Using the same input with different token types

Different token types produce different outputs for the same input:

{
  "mask": [
    {
      "value": "Williams",
      "format": "Person Name",
      "token_name": "Person Token"
    },
    {
      "value": "Williams",
      "format": "Person Name",
      "token_name": "Default Token"
    }
  ]
}

The first produces a realistic name. The second produces a random string. Both are deterministic for their respective token types.