Need to Generate Fake Data for API Testing? Do It Locally in Your Browser
Oct 13, 2026 · AI-assisted
The scenario: a backend dev who just needs 500 believable users
You're wiring up a /users endpoint. The route works, the serializer works, and now you need something to actually push through it — not three hand-typed objects, but a few hundred records with names, emails, signup dates, and addresses that don't all look copy-pasted from the same template.
Most people in this spot open a browser tab, search for a mock data tool, and land on a SaaS generator that wants an account before it shows you a single row. That's the friction worth removing. For API testing specifically, you want three things: realistic field types, a row count you control, and output you can drop straight into a request body or a seed script.
This walkthrough uses Mock Data Generator — a schema builder backed by faker.js that runs entirely in your browser. Nothing is uploaded, and there's no signup wall between you and the data.
Build the schema before you think about row count
The temptation is to generate first and fix the shape later. Do it the other way around.
- Add fields and pick types. Name, email, address, date, and more — each field gets a type, and the generator fills it with faker.js output that matches.
- Set your row count. Free covers 1–20,000 rows. For most endpoint tests, 200–1,000 is plenty; you only need the full range when you're checking pagination or load behavior.
- Generate and preview. Look at the first few rows before you export. If
emailis producing something your validator will reject, you'll see it here rather than in a failing test run. - Export as JSON or CSV. JSON goes into a POST body or a fixture file; CSV goes into a spreadsheet or a bulk import.
That's the whole loop. The reason it's fast is that faker.js is doing the work locally — your schema never leaves the tab, and neither does the generated output.
Matching the schema to your actual API contract
A fake user object is only useful if it looks like the real one. Before you build, open your serializer or your OpenAPI spec and copy the field list. If your API returns created_at as an ISO string, don't generate a date that exports as 03/14/2026 — you'll spend twenty minutes debugging a format mismatch that has nothing to do with your code.
Two habits that save time:
- Name fields exactly as your API does.
firstNameandfirst_nameare different keys to a strict validator. - Generate more rows than you need, then trim. It's easier to delete 50 rows than to regenerate because you were 12 short.
Why browser-only matters more than it sounds
When you paste a schema into a hosted generator, you're describing your data model to a third party. For a side project, who cares. For a client's internal API — where field names alone can hint at the business logic — it's a different calculation.
Running faker.js in the browser means the schema and the output stay on your machine. No upload step, no queue, no "your file will be deleted in 24 hours" promise to take on faith. You can read more about how Toolkite handles this on the privacy page.
It also means the tool works on a plane, on a locked-down corporate laptop, or in a coffee shop with terrible Wi-Fi. If the page has loaded, the generator runs.
Free tier, Pro tier, and when the upgrade actually makes sense
The free version covers a lot: up to 20,000 rows and 15 field types. That's enough for the vast majority of API testing — you're generating fixtures, not a production dataset.
Pro is a one-time $14.99 purchase, and it changes the ceiling rather than the floor:
- Unlimited rows — relevant if you're stress-testing pagination or building a large seed file.
- 30+ field types, including locale data — useful when you're testing internationalization and need names or addresses that aren't all US-shaped.
- Save 20 schemas in IndexedDB — the real quality-of-life feature. Rebuild the same schema every morning and you'll understand why this exists.
- SQL INSERT and multi-format ZIP export — handy when the fake data needs to land in a database rather than a JSON file.
If you generate data once a month, free is fine. If you're regenerating the same three schemas every week, the schema-saving alone pays for itself in annoyance avoided.
Other people who end up here
The API-testing case is the loudest one, but it's not the only one. Frontend developers building list views and empty states need rows that don't all read "Test User 1." QA engineers writing fixtures for edge cases need control over the shape. Data folks prototyping a dashboard need CSV they can import without cleaning first.
And if you're comparing this to a hosted SaaS generator, the honest trade-off is this: hosted tools sometimes offer more exotic field types or team sharing. Browser tools give you the schema staying local and no account. Pick based on which of those you actually care about.
For a related workflow, the JSON to CSV converter handles the opposite direction — turning real API responses into spreadsheets when you need to inspect what came back.
A few edge cases worth knowing
- Deterministic output isn't guaranteed. Regenerating produces new values. If you need the same fixture twice, export it and commit the file.
- Faker output is plausible, not valid. An email will look like an email, but it won't pass a strict RFC check or a uniqueness constraint unless you're careful about row count.
- Watch for collisions at scale. At 20,000 rows, duplicate names are expected. Duplicate emails are less likely but possible — check before you load them into a table with a unique index.
- Dates need a range. A signup date in 1974 is technically valid fake data and completely useless for testing a recent-activity feed.
The short version
Build the schema to match your API contract, generate a row count that fits the test, export as JSON, and move on. The whole thing takes a couple of minutes in the browser, and your schema never leaves your machine. If you want to try it, the Mock Data Generator is free to use without an account.
FAQ
Can I generate fake data for API testing without creating an account?
Yes. The Mock Data Generator runs entirely in your browser with no signup step. You build a schema, choose a row count, and export — the schema and the generated rows never leave your device.
How many rows can I generate for free?
The free tier supports up to 20,000 rows per generation, along with 15 field types. That covers most fixture and pagination testing. Pro removes the row cap and adds more field types, including locale data.
What export formats does the generator produce?
Free exports are JSON and CSV. If you need to load the data straight into a database, Pro adds SQL INSERT statements and a multi-format ZIP export.
Is the generated data deterministic if I regenerate?
No — regenerating produces new values each time. If you need a stable fixture, export the output once and commit that file to your repo rather than regenerating on every test run.
Will the fake emails and names pass my API's validation?
They'll be plausible, but faker.js output isn't guaranteed to satisfy strict RFC checks or uniqueness constraints. At higher row counts, duplicate values become more likely, so check before inserting into a table with a unique index.
Can I save a schema so I don't rebuild it every time?
Saving schemas is a Pro feature — you can store up to 20 schemas in IndexedDB. On the free tier you'll rebuild the schema each session, which is fine for one-off testing but tedious for a recurring workflow.