You can try the JSON Schema Faker. It will take a schema and generate/output a JSON object that will validate against the schema.

Code available on githubcom

Answer from Eric Olson on Stack Overflow
๐ŸŒ
Js
json-schema-faker.js.org
JSON Schema Faker โ€“ Generate Realistic Test Data
Generate valid JSON data from JSON Schema definitions.
๐ŸŒ
ExtendsClass
extendsclass.com โ€บ json-schema-validator.html
Online JSON Schema Validator and Generator
Step 1: Fill "JSON Schema" editor. You can Drag and drop a JSON file, click on "Browse a JSON file"or directly type in the editor. Step 2: You can choose the options (below the editor). If you check "Only required" then only the required fields will be filled in the generated JSON.
๐ŸŒ
Visual Studio Marketplace
marketplace.visualstudio.com โ€บ items
JSON Schema Tools - Visual Studio Marketplace
Extension for Visual Studio - Allows you to easily generate a schema file from a JSON file and generate a JSON file with dummy data based on a schema file.
๐ŸŒ
json-everything
docs.json-everything.net โ€บ schema โ€บ datagen โ€บ schema-datagen
Generating Sample JSON Data from a Schema | json-everything
2 weeks ago - JsonSchema.Net.DataGeneration is a tool that can create JSON data instances using a JSON schema as a framework.
๐ŸŒ
GitHub
github.com โ€บ json-schema-faker โ€บ json-schema-faker
GitHub - json-schema-faker/json-schema-faker: JSON-Schema + fake data generators ยท GitHub
import { generate } from "json-schema-faker"; const data = await generate({ type: "object", properties: { name: { type: "string", minLength: 2 }, age: { type: "integer", minimum: 0, maximum: 120 }, email: { type: "string", format: "email" }, tags: { type: "array", items: { type: "string" }, maxItems: 3 } }, required: ["name", "email"] });
Starred by 3.4K users
Forked by 341 users
Languages ย  JavaScript 61.7% | HTML 20.0% | TypeScript 15.8% | CSS 2.3% | Makefile 0.2%
๐ŸŒ
Domsignal
domsignal.com โ€บ home โ€บ json schema generator | create schemas for your data with ease
JSON Schema Generator | Create Schemas for Your Data with Ease
Using Domsignal JSON Schema Generator, you can generate JSON schema in a snap. Just enter your JSON file or JSON code in the source panel, and the JSON SChema Generator will generate JSON Schema without any manual effort from your side.
Find elsewhere
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ automatic fake json data creation from schema
r/Python on Reddit: Automatic fake JSON data creation from schema
January 12, 2021 -

https://github.com/ghandic/jsf

Use jsf along with fake data generators to provide consistent and meaningful fake data for your system.

Main Features

  • Provides out of the box data generation from any JSON schema ๐Ÿ“ฆ

  • Extendable custom data providers using any lambda functions ๐Ÿ”—

  • Multi level state for dependant data (eg multiple objects sharing value, such as children with same surname) ๐Ÿค“

  • Inbuilt validation of fake JSON produced โœ…

  • In memory conversion from JSON Schema to Pydantic Models with generated examples ๐Ÿคฏ

  • Seamless integration with FastAPI ๐Ÿš€

Installation

$ pip install jsf

---> 100%

Usage

Basic ๐Ÿ˜Š

from jsf import JSF

faker = JSF(
    {
        "type": "object",
        "properties": {
            "name": {"type": "string", "$provider": "faker.name"},
            "email": {"type": "string", "$provider": "faker.email"},
        },
        "required": ["name", "email"],
    }
)

fake_json = faker.generate()

Results in ...

{
    'name': 'Jesse Phillips', 
    'email': 'xroberson@hotmail.com'
}

From JSON file ๐Ÿ“

from jsf import JSF

faker = JSF.from_json("demo-schema.json")
fake_json = faker.generate()

<details markdown="1"> <summary>Or run stright from the <code>commandline</code>...</summary>

Native install

jsf --schema src/tests/data/custom.json --instance wow.json

Docker

docker run -v $PWD:/data challisa/jsf jsf --schema /data/custom.json --instance /data/example.json

</details>

FastAPI Integration ๐Ÿš€

Create a file main.py with:

from jsf import JSF
from fastapi import FastAPI

app = FastAPI(docs_url="/")
generator = JSF.from_json("custom.json")


@app.get("/generate", response_model=generator.pydantic())
def read_root():
    return generator.generate()

Run the server with:

<div class="termy">

$ uvicorn main:app --reload

INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [28720]
INFO:     Started server process [28722]
INFO:     Waiting for application startup.
INFO:     Application startup complete.

Navigate to http://127.0.0.1:8000 and check out your endpoint. Notice the following are all automatically created:

  • Schema with descriptions and examples

  • Example response

  • Data generation by clicking "try it out"

๐ŸŒ
Altova
altova.com โ€บ xmlspy-xml-editor โ€บ json_schema_editor
JSON Schema Editor and Generator | Altova
XMLSpy includes an enterprise-grade JSON Schema generator and graphical JSON schema editor that lets you create JSON Schemas, convert XSD to JSON Schema, generate JSON Schema, and even generate a JSON instance from a schema.
๐ŸŒ
Liquid Technologies
liquid-technologies.com โ€บ json-sample-builder
JSON Sample Generator
Generates Sample JSON data from a JSON Schema. Ideal for creating test data or prototyping. Simple GUI wizard makes it quick and easy to use. Features of the Sample JSON Generator include options to control the size of the generated document ...
๐ŸŒ
Mockaroo
mockaroo.com
Mockaroo - Random Data Generator and API Mocking Tool | JSON / CSV / SQL / Excel
Schemas ยท Datasets ยท APIs ยท Projects ยท Scenarios ยท Functions ยท Databases ยท De-Identify ยท More ยท Upgrade Now ยท Generate DataPreview ยท Save As... Derive from Example...
๐ŸŒ
Workik
workik.com โ€บ ai-powered-json-generator
FREE AI-Powered JSON Generator - Create JSON Schemas | Workik
Personalize your JSON creation by adding any of these contexts. You can connect to GitHub, GitLab, or Bitbucket repos; include relevant database schema, list required fields, their data types, any default values, relevant API blueprints, and more. Utilize Workik's AI to generate, validate, and optimize JSON schemas.
๐ŸŒ
Jsonld
jsonld.com โ€บ home โ€บ json-ld generator
JSON-LD Schema Generator | JSON-LD Schema Generator Tool
April 12, 2024 - We've redeveloped our JSON-LD schema markup generator tool from the ground up and currently have 3 different types which generates valid JSON-LD markup.
๐ŸŒ
GitHub
github.com โ€บ jimblackler โ€บ jsongenerator
GitHub - jimblackler/jsongenerator: A JSON data generator from JSON Schemas, provided as a Java library.
import java.util.Random; import net.jimblackler.jsonschemafriend.Schema; import net.jimblackler.jsonschemafriend.SchemaStore; public class JsonGenerationExample { /** * Generate random Json with the following schema: * { * "type": "object", * "properties": { * "name": { "type": "string" }, * "birthday": { "type": "string","format": "date" }, * "age": { "type": "integer" } * } * } */ public static void main(String[] args) throws Exception { Configuration config = DefaultConfig.build() .setGenerateMinimal(false) .setNonRequiredPropertyChance(0.5f) .get(); SchemaStore schemaStore = new SchemaStor
Starred by 38 users
Forked by 9 users
Languages ย  Java 99.4% | JavaScript 0.6% | Java 99.4% | JavaScript 0.6%
๐ŸŒ
JSON Generator
json-generator.com
JSON Generator โ€“ Tool for generating random data
Generate any random data you want with power of agile templates and save it to our servers for later use.
๐ŸŒ
Newtonsoft
newtonsoft.com โ€บ jsonschema โ€บ help โ€บ html โ€บ GeneratingSchemas.htm
Generating Schemas
Schema generation is performed by the JSchemaGenerator object. It maps .NET objects, collections, properties, and their attributes to their JSON Schema equivalent.
๐ŸŒ
Stoplight
stoplight.io โ€บ json-guide
JSON Schema & Validator | JSON Generator & Editor Guide | Stoplight
While JSON is a compact, flexible data format, consumers of a JSON API want to expect certain fields in the responses. OpenAPI provides that expectationโ€”which some refer to as an "API contract." In the above example, we know that every todo will always include id, name, and completed. Optionally, it may also include a completed_at timestamp. OpenAPI helps you describe all aspects of your APIs. Another related format, JSON Schema, is dedicated to the objects within an API or any other place JSON is used.
๐ŸŒ
TechTutorialsX
techtutorialsx.com โ€บ 2020 โ€บ 09 โ€บ 13 โ€บ generating-testing-data-from-json-schema-with-javascript
Generating testing data from JSON Schema with JavaScript โ€“ techtutorialsx
January 25, 2025 - Now that we have an object representing our JSON schema, we simply need to call the generate method on the imported jsf object. As input, we pass the object we have just parsed and, as output, we will receive an object that conforms with the ...