---
title: Anonymize client IPs for logging
summary: Strip the last octet or compute a hash of client IP address for anonymization.
url: https://www.fastly.com/documentation/solutions/examples/anonymize-client-ip-for-logging
---

Strip the last octet or compute a hash of client IP address for anonymization.

## VCL

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/cceafd31)

## Compute

### Rust

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/ccdaaa64)

### Javascript

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/19c8dac7)

### Go

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/d8ae6a7e)

