Random API Mock Generator
Create realistic mock API structures including REST endpoints, GraphQL queries, OpenAPI payloads, JSON schemas, webhooks, and error responses for API testing and documentation.
Also known as: api mock · test endpoint · mock payload
seeded · synthetic data
Presets
Output
About this tool, tips & examples
What it does
The Random API Mock Generator produces realistic API structures in six flavors: REST endpoint definitions, GraphQL queries, OpenAPI-style payloads, JSON schemas, webhook payloads, and error responses. Generate up to 1,000 items per run, seeded so documentation examples and test fixtures stay stable.
Common use cases
- API documentation — varied, realistic example endpoints and
payloads instead of
/api/fooeverywhere. - Integration test fixtures — webhook payloads and error responses for exercising handlers without a live upstream.
- Prototyping — sketch an API surface (endpoints, queries, schemas) to discuss before committing to a design.
- Error-path testing — realistic error-response bodies for verifying client-side handling and retry logic.
Settings
- Mock type — REST endpoints, GraphQL queries, OpenAPI payloads, JSON schemas, webhooks, or error responses (presets for REST and GraphQL).
- How many — 1 to 1,000 items, exportable as text or JSON.
- Seed — the same seed and settings regenerate the identical mocks.
Privacy note
Mocks are generated locally in your browser and never uploaded. Everything is synthetic — the endpoints route nowhere and the payloads describe nothing real — which is exactly what documentation and fixtures should use.
FAQ
Are the GraphQL queries and JSON schemas valid? They follow the conventions of each format, so parsers and linters treat them as realistic input — ideal for testing tooling that consumes them.
How is this different from Mock JSON? Mock JSON is template-first: you define the exact payload shape. This tool generates the API-shaped structures around payloads — endpoints, queries, schemas, webhooks — when you want variety fast.
Can I use these in a mock server? Yes — export JSON and serve the fixtures from your mock layer (MSW, WireMock, json-server) for offline development.