Tonic Alternatives for PostgreSQL Test Data (2026): Open-Source and Self-Hosted Options

Tonic is one of the best-known names in test data management. Its PostgreSQL-relevant product, Tonic Structural, de-identifies production databases, subsets them and keeps them refreshed for development and QA. It is also a commercial platform sold through sales conversations, which is more than many small teams need. This guide explains what Tonic Structural does, when it is worth paying for, and which alternatives fit PostgreSQL teams with smaller budgets or simpler needs.

Disclosure: Cloud-DB-Anonymizer is our tool. Every other product is described from its own website or documentation as of November 2026, and we have tried to be fair. Corrections are welcome.

What Tonic Structural does

Tonic's product page describes Structural as "a data de-identification platform designed to protect sensitive structured and semi-structured data while preserving schema accuracy and data usability." It works on your existing data rather than generating entirely new records. The capabilities it lists include:

  • Sensitive data discovery that detects PII and PHI automatically.
  • Consistent masking and synthesis, using techniques such as masking, tokenization, generalization, scrambling and format-preserving encryption.
  • Database subsetting that keeps referential integrity.
  • Schema-change alerts and scheduled refreshes so new columns do not slip through.
  • Native connectors for PostgreSQL, MySQL, SQL Server, Snowflake, BigQuery and more.

On the pricing page, Structural comes in Professional and Enterprise tiers, both listed as "Custom pricing" with a "Book a demo" call to action. Professional is deployed via Tonic Cloud; Enterprise adds a self-hosted option, and some sources such as Oracle and Db2 are Enterprise only. Tonic also sells Textual (unstructured text redaction) and Fabricate (synthetic data generation, with a free tier), which are separate products.

When Tonic is the right choice

If you have many databases across several engines, a compliance team that wants automated PII discovery and audit trails, and a budget for a vendor contract, Tonic Structural is a strong option. Subsetting large databases with referential integrity and a supported UI are hard to replicate with scripts. The reasons teams look for alternatives are usually the opposite: a single PostgreSQL database, no procurement process, a preference for open source, or a need to keep data entirely inside their own infrastructure without an enterprise tier.

Tonic alternatives at a glance

Tool Type License / price Closest Tonic feature Main gap vs Tonic
Greenmask Go dump/restore tool Apache-2.0, free Deterministic masking + referentially intact subsetting No UI or automatic PII discovery; config-file driven
PostgreSQL Anonymizer PostgreSQL extension PostgreSQL License, free Masking rules, anonymous dumps, dynamic masking Must be installed on the database server
pganonymize Python CLI MIT, free Column masking with Faker providers Rewrites the target database in place
Cloud-DB-Anonymizer Python CLI + optional self-hosted Pro Suite MIT CLI free; Pro Suite fixed price Consistent masking, scheduled sanitized copies, dashboard No subsetting by relationship, no PII discovery, PostgreSQL only
Neosync Open-source platform MIT, archived Anonymization, synthetic data, subsetting Repository archived in 2025; no longer maintained

Greenmask: the strongest free option for subsetting

Greenmask is a Go tool that replaces pg_dump/pg_restore with anonymization built in. It uses hash-based deterministic transformers, supports conditional transformations, writes to local disk or S3-compatible storage, and can build referentially intact subsets, including cyclic references. If the Tonic feature you care about most is shrinking a large production database while keeping foreign keys valid, Greenmask is the closest open-source match. You trade Tonic's UI and PII discovery for a configuration file you maintain yourself.

PostgreSQL Anonymizer: masking inside the database

PostgreSQL Anonymizer by Dalibo is a server extension. Rules are declared next to your table definitions, and you can choose static masking (rewrite data), dynamic masking (masked roles see fake values while others see real ones) or anonymous dumps. Its function library covers faking, partial scrambling, shuffling and noise. It needs anon loaded through shared_preload_libraries, so check whether your managed provider supports it. Dynamic masking for analysts querying live data is something dump-based tools cannot do.

pganonymize: scrub a copy you already have

pganonymize is a Python CLI configured with YAML, with providers such as faker, mask, md5 and clear. It anonymizes the target database in place (with a --dry-run), so it fits teams that already restore a backup into a scratch database. Never point it at production.

Cloud-DB-Anonymizer: read-only production to a restorable dump

Cloud-DB-Anonymizer is a free, MIT-licensed Python CLI for the job most small teams actually buy test data tools for: a sanitized copy of a production PostgreSQL database for staging, without touching production. It opens a single REPEATABLE READ, READ ONLY transaction, exports the schema with pg_dump, streams rows through 20 strategies (email, name, phone, Luhn-valid credit card, IBAN, SSN, address, IP, date of birth, hash, redact, null, keep and more), and writes a gzip SQL file in foreign-key order with sequences reset. JSONB, arrays and identity columns are handled.

Every fake value is derived from HMAC-SHA256 with your secret salt, so the same input always becomes the same output in every table and on every run. That gives you the consistent masking Tonic advertises, without a mapping table to protect.

python main.py init rules.json
python main.py strategies
python main.py preview jane@corp.com --strategy email
{
  "schema": "public",
  "include_unlisted_tables": true,
  "exclude_tables": ["sessions"],
  "tables": {
    "users":    { "columns": { "email": "email", "full_name": "name", "phone": "phone" } },
    "patients": { "columns": { "date_of_birth": "date_of_birth", "ssn": "ssn" } },
    "events":   { "where": "created_at > now() - interval '30 days'" },
    "uploads":  { "skip_data": true }
  }
}
export ANON_SALT=$(openssl rand -hex 32)
python main.py sanitize --db-url "$DATABASE_URL" --rules rules.json --dry-run
python main.py sanitize --db-url "$DATABASE_URL" --rules rules.json --upload staging-dumps
gunzip -c sanitized_*.sql.gz | psql "$STAGING_DATABASE_URL"

The --dry-run step validates the rules against the live schema, which is a lightweight stand-in for Tonic's schema-change alerts: run it in CI and a new column that is not covered by your rules gets reviewed before it reaches staging. Per-table where filters and skip_data cover simple size reduction, but this is not relationship-aware subsetting, and there is no automatic PII discovery or synthetic generation.

If you want the parts of Tonic that make it an operations tool rather than a script, the self-hosted Pro Suite adds a web dashboard, a rules editor, a cron scheduler, parallel uploads to AWS S3, Cloudflare R2 and DigitalOcean Spaces with retention pruning, and Telegram or Discord alerts. It runs in your own Docker Compose stack, so data never leaves your infrastructure, and it is bought at a published price from the store rather than through a sales-led contract. Agencies running it for several clients can use the Agency License.

What about Neosync?

Neosync used to be the most common open-source answer to "Tonic alternative." Its repository was archived in 2025 after the company was acquired by Grow Therapy, so it is no longer a good choice for new projects. Our Neosync alternatives guide covers migration options in detail.

How to choose

  • Many databases, compliance requirements and a vendor budget: Tonic Structural.
  • Large PostgreSQL database that must be subset with foreign keys intact: Greenmask.
  • Analysts query live data and must not see PII: PostgreSQL Anonymizer with dynamic masking.
  • You already restore backups into a scratch database: pganonymize.
  • One managed PostgreSQL database (RDS, Cloud SQL, Supabase, Neon) and you want a read-only path to a sanitized, restorable file: Cloud-DB-Anonymizer, with the Pro Suite if you want scheduling and a dashboard.

Whatever you choose, keep rules in version control and review them with every migration. For a feature-by-feature comparison of the open-source tools, read PostgreSQL data masking tools compared, or see the Cloud-DB-Anonymizer project page.

Sources