> For the complete documentation index, see [llms.txt](https://docs.jentis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jentis.com/developer-guide/functions-transformations/anonymization-and-pseudonymization.md).

# Anonymization & Pseudonymization

### Anonymization & Pseudonymization Functions

Anonymization and pseudonymization functions are available in all JENTIS Tag Manager accounts. This guide provides an overview of when and how to use each function, along with their intended purposes.

All transformation functions accept a single input parameter and return a transformed output. For more details on transformation function basics, please refer to the Functions (Transformation) Manual.

***

#### Pseudonymization

* **Input Type:** `String`
* **Output Type:** `String`

The pseudonymization function replaces each character in the input string with a random character from the same Unicode general category group (as defined in [Unicode TR44](http://www.unicode.org/reports/tr44/#General_Category_Values)). The structure and length of the input are preserved, ensuring the output has a similar format.

> **Persistence:** The output value is **consistent per tool** on the server-side. This means if you use the same pseudonymization function on the same input (e.g., an IP address) across different tags for the same tool (e.g., Facebook or Google Analytics), the result will remain the same.

**Example**\
Input: `"tEst-123.abc"`\
Output: `"aXqo-987.ucd"`

{% hint style="info" %}
When an IPv4 or IPv6 address is used as input, the function automatically detects the format and returns a pseudonymized value that maintains the structure of a valid IP address.
{% endhint %}

***

#### Anonymization

* **Input Type:** `String`
* **Output Type:** `String`

The anonymization function behaves similarly to pseudonymization but **does not preserve** the output. Each call generates a new random value, even for identical inputs.

> **Use Case:** Ideal when **no linkage** between transformed values is required or desired.

{% hint style="info" %}
When an IPv4 or IPv6 address is used as input, the function automatically detects the format and returns a pseudonymized value that maintains the structure of a valid IP address.
{% endhint %}

***

#### IP Anonymization Functions

These functions anonymize specific sections of a valid IPv4 address. The output retains a valid IP structure but replaces selected segments with random numbers.

* **Input Type:** `String` (valid IPv4 address)
* **Output Type:** `String` (valid IPv4 address)

**Available Functions:**

1. **Randomize Last IP Section**\
   Example: `192.168.0.123` → `192.168.0.XXX`
2. **Randomize Last 2 IP Sections**\
   Example: `192.168.0.123` → `192.168.XXX.XXX`
3. **Randomize Last 3 IP Sections**\
   Example: `192.168.0.123` → `192.XXX.XXX.XXX`
4. **Randomize All IP Sections**\
   Example: `192.168.0.123` → `XXX.XXX.XXX.XXX`

> **Note:** The output values remain syntactically valid IPv4 addresses, but the randomized segments cannot be used to identify individuals.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.jentis.com/developer-guide/functions-transformations/anonymization-and-pseudonymization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
