Sample JSON From JSON Schema
Generate a sample JSON document from a JSON Schema, using its examples, defaults, enums and formats, with an option for required properties only.
Free · No sign-up · Your inputs stay in your browser
Input
Generate sample JSON from a JSON Schema
Output
Sample
211 characters
Uses the schema's own examples, default, const and first enum value where it has them, otherwise a value that satisfies the type, format, minimum and length constraints. Local $ref, allOf and the first branch of oneOf and anyOf are followed. Good for mocking an API response or seeding a contract test; the required-only version shows the smallest valid payload.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Uses
Mock API responses for frontend work before the backend exists, seed a contract test with a valid request body, show an example in documentation that is guaranteed to match the schema, or see the smallest valid payload with required-only mode. OpenAPI component schemas work too, because OpenAPI 3.1 schemas are JSON Schema.
Plausible, not realistic
Values are chosen to pass validation, not to look like production data. Add examples to the schema itself (the examples keyword) and they are used here, in documentation and by mock servers such as Prism.