# Redact IP addresses

> Redact IPv4 addresses from access logs, error traces, and analytics exports with a format check per octet.

Canonical: https://bitbanger.in/entities/ip-address
Last updated: 2026-10-27

Category: Contact details · Entity type: `contact.ip_address`

Under GDPR and most privacy regimes an IP address is personal data. It is also the field most often left in a log paste when a customer sends you a stack trace.

## How Redactly detects IP addresses

- Matched by regex with every octet validated to the 0-255 range, so version strings and dates do not match.
- Runs independently of the model, which means an address in an otherwise empty log line is still found.
- The pattern covers IPv4, with every octet validated to the 0-255 range; IPv6 strings are left to the model.

## Why redact IP addresses?

Logs are routinely pasted into tickets, chat, and LLM prompts, carrying user IPs with them.

## Example request

```bash
curl -X POST https://api.bitbanger.in/v1/redact \
  -H "X-API-Key: rdct_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"text": "2026-10-26T09:14:02Z client 203.0.113.47 GET /v1/redact 200.", "style": "replace"}'
```

## FAQ

**Does Redactly redact IP addresses automatically?**

Yes. Send text to the API and every detected type is redacted, including IP addresses. To redact only this type, pass the value contact.ip_address in the entities filter. No training or configuration is required.

**What happens to IP addresses after redaction?**

With style set to replace, each match becomes [contact.ip_address] — the entity type in square brackets. Setting style to mask replaces every character with a block character, and remove deletes the span entirely.

## Related entity types

- [MAC addresses](https://bitbanger.in/entities/mac-address) — Redact hardware MAC addresses from network logs, DHCP dumps, and device inventories.
- [Device identifiers](https://bitbanger.in/entities/device-id) — Redact device IDs and installation identifiers from analytics payloads and crash reports.
- [Profile URLs](https://bitbanger.in/entities/url) — Redact URLs that point at a person, such as profile, portfolio, and social links.

Try it on your own text: https://bitbanger.in/entities/ip-address
