> For the complete documentation index, see [llms.txt](https://docs.syntho.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.syntho.ai/configure-a-data-generation-job/configure-column-settings/mask/text.md).

# Text

Below is a list of available text mask functions.

## **Format preserving encryption (FPE)**

The **Format preserving encryption (FPE)** function utilizes the FF3 algorithm to encrypt sensitive data while preserving its original format and length. This makes it ideal for fields where the data's structure must remain intact (e.g., credit card numbers or dates). Note that it preserves data format during encryption and supports unique and randomized subsets for varied datasets​. The values are generated in a consistent manner.

#### **Parameters**

* `Alphabet` : By default, it contains all ASCII letters, uppercase and lowercase and numbers.

#### **Example** <a href="#example---shifting-a-set-of-dates" id="example---shifting-a-set-of-dates"></a>

If you configure:

```
Alphabet: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
```

The results will be:

```
0kVRnFWud,
uCgInrq6,
772edmb G,
...
```

<figure><img src="https://1383248054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU61B9DqtWCNO3Z30vnjh%2Fuploads%2Fgit-blob-3fe7594b0f9669cc3b67985bb060aafbac47ec8d%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## **Numeric hasher**

The **Numeric hasher** function provides secure hashing for categorical values. This method replaces original values with a hashed representation, ideal for ensuring data privacy while maintaining referential integrity in numerical datasets. Note that It maintains the original structure of hashed fields. and the minimum number of characters depends on the size of the alphabet used, typically resulting in a minimum of 4 characters in a consistent manner. To ensure accurate ordering, please see [ordering and indexing considerations](https://docs.syntho.ai/configure-a-data-generation-job/configure-column-settings/consistent-mapping.md#ordering-and-indexing-considerations).

#### Parameters

* No parameters.

#### Example <a href="#example---shifting-a-set-of-dates" id="example---shifting-a-set-of-dates"></a>

If you configure:

```
Column names:
Anne,
John,
Chris,
...
```

The results will be:

```
Column names:
3842648596,
3397993411,
70461273,
...
```

<figure><img src="https://1383248054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU61B9DqtWCNO3Z30vnjh%2Fuploads%2Fgit-blob-4334d54dd8a7eead9e6ecd216b1ca03edbaa37c9%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## **Random character swap**

The **Random character swap** function replaces individual characters in categorical values while preserving the structure of punctuation, spaces, and symbols. Characters are swapped within their respective categories (letters with letters, digits with digits), ensuring that the field's overall format remains usable, or in other words, the original data type and structure of each field (letters, numbers, symbols) are preserved. Note that it preserves non-alphabetic characters (e.g., punctuation, spaces)​.

#### **Parameters**

* `Consistent mapping`: Random character swap supports [consistent mapping](https://docs.syntho.ai/configure-a-data-generation-job/configure-column-settings/consistent-mapping.md). When enabled, each input character is always mapped to the same output character. The mapping is case-preserving: if a lowercase character is mapped to another lowercase character, the corresponding uppercase character is mapped to the uppercase version of that same output character. For example, if `a` is mapped to `z`, then `A` is mapped to `Z`.

#### **Example** <a href="#example---shifting-a-set-of-dates" id="example---shifting-a-set-of-dates"></a>

If you configure:

```
Column names:
Mavis612,
Frank378,
Tijuana228,
...
```

The results will be:

```
Column names:
Eiqxj928,
Wawak904,
Rqrsuzb283,
...
```

<figure><img src="https://1383248054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU61B9DqtWCNO3Z30vnjh%2Fuploads%2Fgit-blob-bf005de83e24d2f552ce00072534acde1f910f50%2Fimage.png?alt=media" alt="" width="529"><figcaption><p>Consistent mapping enabled for Random character swap</p></figcaption></figure>

## **Shuffle**

The **Shuffle** function shuffles existing text values while preserving the overall frequency of values.

Shuffle works batch-wise. Each generated batch is shuffled independently, based on the configured **Batch size**.

`NULL` values are treated as a distinct value and are shuffled like any other value.

#### **Parameters**

* `Rare Category Protection`: Enables protection for infrequent values during shuffling. Configure its threshold and replacement value.

<figure><img src="https://1383248054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU61B9DqtWCNO3Z30vnjh%2Fuploads%2Fgit-blob-3f68b0cd12974554a1c9e1952a319915cc0d80a9%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## **Rare category protection**

The **Rare category protection** generator replaces infrequent text values with a user-defined replacement value.

Use this standalone Mask generator when you need to protect rare values without shuffling the column. You can also enable it as a parameter of **Shuffle**.

#### **Parameters**

* `Rare category protection threshold`: Values occurring at or below this frequency are replaced. The default is `10`.
* `Rare category replacement value`: The value that replaces rare values. The default is `*`.

{% hint style="warning" %}
Rare category protection works per generated batch. A smaller **Batch size** makes values more likely to meet the threshold.
{% endhint %}

<figure><img src="https://1383248054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU61B9DqtWCNO3Z30vnjh%2Fuploads%2Fgit-blob-9ef0f0119dc96e687e92db75268d8f41a658d927%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## **Text de-identification**

**Text de-identification** detects sensitive information inside text and handles each entity independently. Choose **Mock** to generate replacement values, **Annotate** to insert entity labels such as `<EMAIL>`, or **Disable** to leave that entity out of detection.

Select a **Locale** and an optional **Detection model**. **None** retains the available regex, lookup and built-in detection without an NLP model. Configure custom regex entities, extend system entities, set minimum confidence, and exclude known non-sensitive detections.

{% hint style="warning" %}
Text de-identification can significantly increase generation time. Review representative sample output before processing the full dataset.
{% endhint %}

#### **Parameters and configuration**

* **Locale** and **Detection model**.
* **Entity types**: per-entity action, minimum confidence and replacement generator for Mock.
* **Exclude from detection list**: regex expressions for false positives.
* **Exclude only exact matches**: enabled by default; when disabled, an exclusion may match any part of a detected value.
* **Consistent mapping**: configure it on an entity's replacement generator to keep matching values aligned across text and structured columns, using the same generator, settings and seed.
* Existing rare-category protection settings remain available and apply before sensitive-data processing.

See [Text de-identification](https://docs.syntho.ai/configure-a-data-generation-job/configure-column-settings/mask/text/automatic-pii-discovery-and-de-identification-in-free-text-columns.md) for setup, custom entities, bulk actions, exclusions and examples. For predefined entities, see [Supported sensitivity entities](https://docs.syntho.ai/configure-a-data-generation-job/manage-personally-identifiable-information-pii/supported-pii-entities.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.syntho.ai/configure-a-data-generation-job/configure-column-settings/mask/text.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
