PostgreSQL Fake Data Generator
Generate dummy rows as PostgreSQL INSERT statements, with a matching CREATE TABLE. Pick fields or paste a JSON Schema.
Example output
CREATE TABLE "users" (
"id" UUID,
"full_name" TEXT,
"email" TEXT,
"city" TEXT,
"is_active" BOOLEAN,
"created_at" TIMESTAMPTZ
);
INSERT INTO "users" ("id", "full_name", "email", "city", "is_active", "created_at") VALUES
('e0d13938-a021-4475-bc3c-6b040b52f2a3', 'Elizabeth Rodriguez', 'fatima.perez53@test.dev', 'Seoul', TRUE, '2026-06-02T16:59:49.727Z'),
('e05a48a7-4411-481b-b483-aab52154157c', 'Betty Garcia', 'karen.martinez20@mail.com', 'Dublin', TRUE, '2026-08-24T09:48:56.104Z'),
('1450cd65-969f-4f8c-9307-5eb4b63f71ad', 'Mark Dubois', 'ahmed.thompson92@demo.io', 'Austin', FALSE, '2024-12-14T00:22:32.747Z');Loading it
psql
psql -d mydb -f mock-data.sql
Docker
docker exec -i my-postgres psql -U postgres -d mydb < mock-data.sql
How the PostgreSQL output is built
- →Columns get native types: UUID, BOOLEAN, INTEGER, NUMERIC, TIMESTAMPTZ, and JSONB for nested objects and arrays.
- →Identifiers are double-quoted and strings use standard single-quote escaping, so names like "order" and values like O'Brien load without errors.
- →Rows are inserted 500 per statement, which loads thousands of rows in well under a second.
- →With a seed, the same settings give the same data every time, which is useful for repeatable tests.
Frequently asked
How do I load the generated SQL into PostgreSQL?
Download the file and run psql -d yourdb -f mock-data.sql, or paste it into pgAdmin, DBeaver or the query tool of your hosting provider (Supabase, Neon, RDS).
Can PostgreSQL generate fake data itself?
For simple numbers and series, yes: INSERT … SELECT with generate_series() and random(). For realistic names, emails and addresses, a generator like this one is quicker, and the postgresql_faker extension exists if you need it inside the database.
How do I insert into a table that already exists?
Untick CREATE TABLE and set the table name; the column names come from your field names, so match them to the existing table.
Everything is generated in your browser. Need the data in another shape? Convert it with CSV ↔ JSON, or describe its structure first with the JSON Schema Generator.