SeedBase, a Mockaroo alternative for relational, FK-consistent test data
Mockaroo earned its popularity: it is one of the fastest ways to get a CSV of plausible-looking rows for a single table. This is an honest look at where it shines, where it stops once foreign keys and many tables are involved, and when a schema-aware generator is the better tool. SeedBase reads the same schema and keeps every foreign key consistent, whether you start from SQL, Django or Prisma.
Jump to: foreign keys across tables · Mockaroo vs SeedBase · migration guide · mask real data
Where Mockaroo is genuinely good
- Instant flat datasets: pick field types in the browser, download CSV, JSON, SQL or Excel, no setup.
- A huge library of field types and formulas, plus regex and custom expressions.
- Mock APIs for frontend prototyping, served straight from a saved schema.
If you need a thousand fake rows for one table or a quick API stub, Mockaroo is a fine choice, and faster than setting up anything else.
How Mockaroo works: define every field by hand
Mockaroo is field-first. You open a schema in the browser and add one column at a time, choosing a type for each from its library (Full Name, Email Address, City, a regex, a formula, and so on). The schema is a flat list of fields for a single table, and you set the row count and output format (CSV, JSON, SQL, Excel) at the top.
That model is fast for a single table. It also means the shape of your data lives in Mockaroo's UI, not in your codebase: there is nothing that reads your CREATE TABLE statements, your Django models.py or your schema.prisma and turns them into a generator. You rebuild the column list by hand, and you keep it in sync by hand when the schema changes.
Where Mockaroo gets hard: foreign keys across many tables
Mockaroo can relate two tables, but it is manual and it does not read your relationships from a schema. The documented path is the Dataset Column field type: you generate or upload the parent table first, save it as a Dataset (Datasets accept only CSV and JSON), then in the child schema add a Dataset Column or a from_dataset() formula that looks a value up in that saved dataset.
For one parent and one child that works. It starts to bite when:
- You have dozens of tables. Every foreign key is a separate Dataset Column you wire by hand, in dependency order, and you re-export the parent dataset whenever it changes.
- You need composite or multi-column foreign keys, or a child whose other fields must stay consistent with the parent it points at. These are recurring questions on Mockaroo's own community forum, not a one-click feature.
- You want realistic relational skew, where one parent has 2 children and another has 19. Per-field randomness does not give you that across a join.
None of this is a knock on Mockaroo for what it is built for. It is a flat-dataset and mock-API tool, and foreign keys across a real, hundred-table schema are simply not its core job.
How SeedBase works: import the schema, keep the keys
SeedBase is schema-first. Instead of listing fields by hand, you hand it the schema you already have and it reads the tables, columns and foreign keys for you:
- SQL dump: paste
CREATE TABLEstatements from PostgreSQL or MySQL. - Django: push
models.py(the VS Code and JetBrains plugins do it in one click). - Prisma: push
schema.prisma. - Live database: connect a read-only PostgreSQL or MySQL URL and let it introspect.
From there, every declared foreign key is honored automatically. Children reference parents that actually exist, rows are emitted in dependency order, and the relational shape holds across hundreds of tables without you wiring a single Dataset Column. Generation is deterministic: pass a seed and the same schema produces the same rows every run, and a pinned reference_date makes timestamps reproducible. We tested SeedBase against a real 20-app Django project with 226 tables, that is the scale it was built for.
Mockaroo vs SeedBase: where they differ
| Mockaroo | SeedBase | |
|---|---|---|
| Starting point | You define every field by hand in the browser UI | Your real schema: SQL dump, Django models.py, Prisma, or a live DB connection |
| Foreign keys | Manual, per relationship: save a parent Dataset (CSV/JSON only), then a Dataset Column or from_dataset() lookup in the child | Read from the schema and honored automatically; children reference parents that exist, in dependency order, across hundreds of tables |
| Scale across tables | One flat table per schema; multi-table relations wired one at a time | Whole-database generation; FK-complete subsetting of an existing database |
| Distributions | Per-field randomness | Realistic relational skew: long-tail child counts (one user has 2 orders, another 19), smart per-table row counts |
| Production data | Not its focus, synthetic-only | PII detection + format-preserving, consistent masking of real data |
| Workflow | Web UI, downloads, mock APIs, REST API | Web UI plus CLI, Node/PHP SDKs, pytest plugin, VS Code & JetBrains plugins, MCP for AI assistants |
| Output | CSV, JSON, SQL, Excel | SQL, CSV, JSON, or a direct push into your database |
| Reproducibility | Regenerate on demand | Deterministic by seed and reference_date; config-as-code committed next to your migrations |
| Free tier | 1,000 rows per request, 200 API requests/day; paid from $50/year | Free tier without a credit card, including schema import and generation; paid from €19/month |
Migrating from Mockaroo to SeedBase
You keep what Mockaroo gave you, plausible per-field values, and add the part it makes you do by hand: relationships read straight from your schema. The move is short because SeedBase reads the schema you already have instead of asking you to retype the columns.
- Create a project from your schema. Paste a
CREATE TABLEdump, or pushmodels.py/schema.prismafrom the editor plugins, or connect a live database URL at seedbase.dev. SeedBase reads tables, columns and foreign keys and builds the generation blueprint, so you never re-list fields by hand. - Adjust column hints if you want. The visual editor lets you set a semantic type, an enum, or min/max per column, the same control Mockaroo gives per field, but only where you actually need it.
- Grab an API key. One free key under Settings, API keys (it looks like
dr_sk_...). Put it in theSEEDBASE_TOKENenvironment variable. - Generate and export. Export
INSERTstatements, CSV or JSON, or push the rows straight into a database. Pass aseedso every run is reproducible.
Generate FK-consistent SQL instead of a flat CSV
Where Mockaroo hands you one table's CSV, SeedBase produces a full set of INSERT statements with every foreign key resolved, in load order. Generate a SQL file in a pipeline step and load it before your test suite:
// seed-sql.mjs, run in CI
import { SeedbaseClient } from "@seedbase/client";
import { writeFile } from "node:fs/promises";
const client = new SeedbaseClient({ token: process.env.SEEDBASE_TOKEN });
const gen = await client.generate(process.env.SEEDBASE_PROJECT, { seed: 42, wait: true });
await writeFile("seed.sql", await client.download(gen.id, { format: "sql" }));
# .github/workflows/test.yml
- run: node seed-sql.mjs
- run: psql "$DATABASE_URL" -f seed.sql
Because the data is keyed off the seed, a failing test reproduces locally with the same seed: 42. The full SQL path is on the SQL test data page.
Rows in memory for a test fixture
Prefer the rows in your test process rather than a CSV import? The Node SDK returns them keyed by table, already in foreign-key-safe order, so a child row always points at a parent that exists in the same batch:
import { SeedbaseClient } from "@seedbase/client";
const client = new SeedbaseClient({ token: process.env.SEEDBASE_TOKEN });
const rows = await client.seededRows(projectId, { seed: 42, rows: 100 });
// { users: [...], orders: [...], order_items: [...] }
For Prisma there is a one-call seedPrisma helper that inserts in dependency order through prisma db seed, covered on the Prisma test data page. For Django, pull the same rows into a pytest fixture, see Django test data.
One more thing Mockaroo does not do: mask real data
Mockaroo generates synthetic data only. When the job is the opposite, taking a real production database and making it safe to share, SeedBase detects PII and applies format-preserving, consistent masking, then can subset the database while keeping every foreign key complete. That is the staging and GDPR use case Mockaroo was never meant for, covered on the GDPR anonymization page.
When to pick which
Pick Mockaroo for one-off flat datasets, a quick mock API, or when you want to design a single table's fields by hand without importing anything.
Pick SeedBase when you already have a schema and want it filled correctly: foreign-key integrity across many tables, FK-complete subsetting, realistic distributions, repeatable seeds for CI, masked production data for staging, and generation straight from your IDE or AI assistant.
Mockaroo alternative: FAQ
Yes, for relational test data. SeedBase imports your real schema (SQL dump, Django models, Prisma, or a live database) and generates datasets where every foreign key resolves. Mockaroo is excellent for quickly mocking flat single-table datasets and mock APIs; SeedBase focuses on schema-true, relationally consistent data plus production-data masking.
Yes. Paste a SQL dump, push Django models.py or a Prisma schema (the editor plugins do it in one click), or connect PostgreSQL or MySQL directly. The schema, including foreign keys, becomes the blueprint for generation, so you never re-list columns by hand.
Manually. Mockaroo does not read relationships from a schema. You generate or upload the parent table, save it as a Dataset (CSV or JSON only), then in the child schema add a Dataset Column or a from_dataset() formula that looks the value up. It works for one parent and child, but every relationship is wired by hand, which gets heavy across many tables.
Yes. SeedBase reads the foreign keys from your schema and honors them automatically. Children reference parents that exist, rows are emitted in dependency order, and the relational shape holds across hundreds of tables. We tested it against a real 20-app Django project with 226 tables.
On the free plan, Mockaroo allows 1,000 rows per request and 200 API requests per day. Paid plans start at $50 per year for larger limits. SeedBase has a free tier without a credit card, including schema import and generation, with paid plans from 19 euro per month.
SeedBase exports SQL INSERT statements, CSV and JSON, and can also push rows directly into a PostgreSQL or MySQL database. Mockaroo additionally offers Excel and a hosted mock API; SeedBase trades those for relational correctness and direct database loading.
Yes. Pass a seed (for example seed: 42) and the same schema produces the same rows on every run, which keeps CI and snapshot tests stable. A pinned reference date makes timestamps reproducible too.
Try the SeedBase way, free.
Import a schema (SQL, Django models, Prisma, or connect a database), generate FK-consistent data with realistic distributions, and pull it into your dev or CI database. No card required, no sales call.
Create a free accountSee it for your stack: Django test data · Prisma test data · SQL test data · GDPR anonymization · docs
More comparisons: SeedBase vs Tonic · SeedBase vs Faker · SeedBase vs Snaplet Seed