# Sanitise production data for staging

> Turn a production dump into something safe to load into a non-production environment, without losing the shape of the data.

Canonical: https://bitbanger.in/use-cases/test-data
Last updated: 2026-10-27

Most staging environments are full of real customer data because regenerating realistic fixtures is tedious. Redacting a production sample is the cheaper route, and it keeps the distribution of values that makes staging useful for testing.

## What this gives you

- Redact the dump, then load it. The schema, types, and row counts survive; the identifiers do not.
- Works on JSON and CSV files through the file endpoint.
- Use style=remove when a field must be empty rather than labelled, such as a nullable email column.
- Repeatable: the same input produces the same output, so fixtures stay stable between runs.

## Request

```bash
curl -X POST https://api.bitbanger.in/v1/redact/file \
  -H "X-API-Key: rdct_your_key_here" \
  -F "file=@prod_sample.json" \
  -F "style=replace" \
  --output staging_sample.json
```

## FAQ

**Does it handle nested JSON?**

Yes. Every string value in the tree is processed recursively, at any depth, while keys and non-string values are left alone.

**Is the output deterministic?**

Yes. Detection is deterministic for a given input, so repeated runs produce identical fixtures.

## Related

- [All 40 entity types](https://bitbanger.in/entities/)
- [Integrations](https://bitbanger.in/integrations/)
- [API reference](https://bitbanger.in/docs)

Live demo: https://bitbanger.in/use-cases/test-data
