---
title: "Feature: #84053 - API to anonymize IP addresses"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-84053"
source: "Changelog/7.6.x/Feature-84053-APIToAnonymizeIPAddresses.rst"
typo3-version: "7.6.x"
typo3-major: 7
type: "feature"
issue: 84053
forge: "https://forge.typo3.org/issues/84053"
tags: ["PHP-API", "ext:core", "ext:indexed_search"]
rendered: "2026-09-19T12:12:50+00:00"
---

# Feature: #84053 - API to anonymize IP addresses {#feature-84053}

See [forge#84053](https://forge.typo3.org/issues/84053)

## Description {#description}

A new API has been introduced which can be used to anonymize IP addresses.
This shall help to comply with data protection and privacy laws and requirement.

`\TYPO3\CMS\Core\Utility\IpAnonymizationUtility::anonymizeIp(string $ipAddress, int $mask = null)`

If `$mask` is set to null (default value), the setting `$GLOBALS['TYPO3_CONF_VARS']['SYS']['ipAnonymization']` is taken into account.

The following options for `$mask` are possible:

-   `0`: The anonymization is disabled.
-   -   **`1`: For IPv4 addresses the last byte is masked. E.g. `192.168.100.10` is transformed to `192.168.100.0`.**

        For IPv6 addresses the Interface ID. E.g. `2002:6dcd:8c74:6501:fb2:61c:ac98:6bea` is transformed to `2002:6dcd:8c74:6501::`
-   -   **`2`: For IPv4 addresses the last two bytes are masked. E.g. `192.168.100.10` is transformed to `192.168.0.0`.**

        For IPv6 addresses the Interface ID and SLA ID. E.g. `2002:6dcd:8c74:6501:fb2:61c:ac98:6bea` is transformed to `2002:6dcd:8c74::`

The default value for `$GLOBALS['TYPO3_CONF_VARS']['SYS']['ipAnonymization']` is `1`!

## Impact {#impact}

The core uses this API whenever IP addresses are stored, this includes:

-   Indexed Search uses the new setting for its search statistics.
