Production data for dev and staging, without the personal data. Cloud-DB-Anonymizer exports your PostgreSQL database, replaces every email, name, phone number, credit card and IBAN with realistic fake data, and gives you a clean SQL dump you can restore anywhere. Joins and foreign keys keep working.
⬇ Download the free CLI · See Pro & Agency →
How it works
- List the columns that hold personal data in a small
rules.jsonfile (for exampleusers.email → email,payments.card_number → credit_card). - Run
python main.py sanitize --db-url $DATABASE_URL --rules rules.json. - Restore the result into staging with
gunzip -c sanitized_*.sql.gz | psql $STAGING_DATABASE_URL.
| Column | Production | Sanitized |
|---|---|---|
| jane.doe@acme.com | antoniomacdonald.faa812c4@example.com | |
| name | Jane Doe | Maria Harmon |
| phone | +212 600-111222 | +1-555-726-7654 |
| credit card | 4111 1111 1111 1111 | 4756410247684656 (Luhn-valid) |
| IBAN | GB82WEST12345698765432 | GB17NPNE05766470207453 |
Built for real databases
- Deterministic fakes — values are derived from an HMAC-SHA256 keyed with your secret salt, so the same real value becomes the same fake one in every table. Foreign keys, joins and unique indexes survive.
- Restorable dumps — schema via pg_dump, data in foreign-key order, sequences reset, identity and JSONB columns, arrays.
- Read-only and consistent — one REPEATABLE READ, READ ONLY transaction; huge tables are streamed at constant memory.
- Subset and exclude — filter rows with WHERE clauses, drop tables, or keep only the schema of log tables.
- 20 strategies — email, name, first_name, last_name, username, phone, credit_card, iban, ssn, address, city, postcode, company, ip, url, text, date_of_birth, hash, redact, null.
Pricing
| Free CLI | Pro Suite | Agency License | |
|---|---|---|---|
| Price (one-time) | Free | 289 MAD (≈ US$29) | 779 MAD (≈ US$79) |
| PII anonymization, 20 strategies | ✓ | ✓ | ✓ |
| Restorable gzip SQL dumps | ✓ | ✓ | ✓ |
| Upload to one S3-compatible bucket | ✓ | ✓ | ✓ |
| Parallel sync to AWS S3 + Cloudflare R2 + DigitalOcean Spaces | — | ✓ | ✓ |
| Cron scheduler + retention pruning | — | ✓ | ✓ |
| Web dashboard (Next.js + Tailwind) | — | ✓ | ✓ |
| Telegram and Discord alerts | — | ✓ | ✓ |
| Docker Compose deploy | — | ✓ | ✓ |
| Client deployments + rebranding | — | — | ✓ |
| Download | Buy Pro | Buy Agency |
Checkout is in Moroccan dirham; your card converts automatically. Instant download, full source code, free 1.x updates. The Pro Suite is self-hosted: your data and cloud keys never leave your infrastructure.
Guides
- Tonic alternatives for PostgreSQL test data (2026): open-source and self-hosted options
- How to mask credit card numbers in PostgreSQL test data (PCI-friendly staging)
- pg_dump vs logical replica vs snapshot restore: how to get production data into PostgreSQL staging (2026)
- How to anonymize a pg_dump: share PostgreSQL dumps without personal data
- Neosync alternatives for PostgreSQL (2026): what to use now that Neosync is archived
- How to anonymize a PostgreSQL database in GitHub Actions (CI rules check + nightly sanitized dump)
- Open-source PostgreSQL data masking tools compared (2026): Greenmask vs PostgreSQL Anonymizer vs pganonymize vs Cloud-DB-Anonymizer
- How to anonymize a PostgreSQL production database for staging (without breaking foreign keys)
- GDPR and test data: stop copying real customer data into dev and staging
- Nightly sanitized PostgreSQL backups to AWS S3, Cloudflare R2 and DigitalOcean Spaces
Source code: github.com/fadadyounes-pixel/cloud-db-anonymizer
FAQ
Does it write to my production database?
No. It only runs SELECT statements inside a read-only transaction. A read-only database user is enough.
Which PostgreSQL hosts work?
PostgreSQL 12 and newer: Amazon RDS and Aurora, Google Cloud SQL, Supabase, Neon, DigitalOcean and self-hosted.
Can the fake data be reversed?
Not without your salt. Rotate the salt to generate a completely new data set.
Is it GDPR compliant?
It helps with data minimization by keeping real personal data out of non-production systems. Compliance also depends on your rules covering every PII column, so review them when your schema changes.