OpenAPI Mock Data Generator
Generate realistic mock responses from an OpenAPI schema, in your browser.
Runs in your browser. Nothing is uploaded — your input is processed on this device and discarded when you close the tab.
OpenAPI Mock Data Generator
How to use this tool
- Paste an OpenAPI document as JSON (or just a schema object) into the box.
- Click Run to generate mock JSON for the first response schema found, or for the schema itself.
- Copy the result into your tests or frontend stub.
Worked example
The sample schema describes a user with id (integer), name (string) and email (format email). The mock is {"id": 1, "name": "Sample Name", "email": "user@example.com"} — the id heuristic and the email format shape the values, not random text.
What this tool does not do / Limits
Input must be JSON; YAML OpenAPI files are not parsed here (use the diff checker, which accepts a simple YAML subset, or convert first). Local references (#/components/schemas/…) inside the same document are resolved; remote references are not fetched. Values are deterministic samples, not random data, so repeated runs give the same mock.
Frequently asked questions
Which response does it mock?
The first successful (2xx) response schema found when scanning paths in document order. If you paste a bare schema instead of a full document, that schema is mocked directly.
Are the values realistic?
They follow the schema's type, format, enum and example where given, plus simple name heuristics (email, name, id, price, url). They are plausible placeholders for development, not production data.
Related tools
JSON Studio
Format, validate, minify, query and compare JSON in your browser, with precise line-and-column errors.
LiveRegex Tester
Test patterns against sample text with match highlighting, capture groups and a safe one-second timeout.
LiveSecurity Header and DNS Checker
Check HSTS, CSP and other security headers, TLS details, and DNS/email authentication records (SPF, DKIM, DMARC).
Live