Generate realistic fake JSON records from a type-spec or an inferred example object — mock API responses without standing up a backend.
A premium, zero-dependency mock-data workbench for backend and frontend developers alike. Write a lightweight type-spec (or paste a real example object and let it infer one), pick a record count, and get pretty-printed, realistic fake JSON — instantly, entirely in your browser, with nothing ever leaving your machine.
API Mock Generator Pro is part of the Web Utility Suite. It runs entirely in the browser with no build step, no frameworks, and no network calls — open index.html from disk and it works. It ships its own small hand-built fake-data engine (names, emails, words, dates, UUIDs, URLs, phone numbers, sentences) so you can stub out API responses, seed a UI with placeholder data, or hand a frontend team a realistic payload before an endpoint exists — all without a live backend.
- Two input modes — write a type-spec directly (
{"id":"uuid","name":"string","email":"email"}), or paste a real example object and generate from its inferred shape. - Schema inference — the "Infer schema" button reads a pasted example object and detects each field's type: strings are checked against UUID / email / URL / date / datetime patterns, numbers are split into
numbervsfloat, arrays infer their element type, and nested objects recurse. - Rich type vocabulary —
string,number/int/float,boolean,email,name/firstname/lastname,date/datetime,uuid,url,phone,city,word/sentence/paragraph, plustype[]for arrays of any of the above and nested objects/arrays-of-objects for deeper shapes. - Own fake-data engine — hand-built banks of first/last names, words, domains and cities; no external faker library, no CDN, no network calls.
- Configurable record count (1–500), a one-click Regenerate that re-rolls fresh data against the same schema, and pretty-printed 2-space JSON output with syntax highlighting.
- Copy and download
.jsonthe generated array. - Auto-persist — your last schema, mode, and record count are saved to
localStorageand restored on return. - Dark & light themes, fully responsive down to 360px, accessible, and keyboard-driven.
No dependencies, no build step.
git clone https://github.com/kasapdev/api-mock-generator-pro.git
cd api-mock-generator-proThen simply open index.html in any modern browser (double-click it, or file:// it). That's it.
- Choose Type-spec to write the shape yourself, or Example object to paste a real sample record.
- In example mode, click Infer schema to auto-detect field types and drop the resulting type-spec into the editor.
- Set the desired Records count and click Generate (or press Ctrl/⌘+Enter).
- Click Regenerate (Ctrl/⌘+R) any time to roll a fresh batch against the same schema.
- Copy the output or Download it as a
.jsonfile (Ctrl/⌘+S).
| Action | Shortcut |
|---|---|
| Generate records | Ctrl/⌘ + Enter |
| Regenerate | Ctrl/⌘ + R |
Download as .json |
Ctrl/⌘ + S |
| Show shortcuts help | ? |
| Close dialog | Esc |
Screenshots coming soon.
- CSV / SQL insert-statement export alongside JSON
- Custom value ranges and enums per field (e.g. restrict a
statusfield to a fixed list) - Locale-aware name/word banks
- Seeded/deterministic generation for reproducible fixtures
- REST endpoint mode — serve the generated array from a local mock server snippet
MIT Licensed. Part of the Web Utility Suite.
One of 45+ zero-dependency vanilla JS tools, all free and open source — see the full list.