JSON to Pydantic Model Converter

Paste a JSON payload and get Pydantic models for FastAPI or any Python service. Nested objects become their own model classes.

Example

Input
{
  "name": "parsebox",
  "version": "2.1.0",
  "private": false,
  "maintainers": [
    { "name": "Ada Lovelace", "email": "[email protected]", "active": true },
    { "name": "Alan Turing", "email": "[email protected]", "active": false }
  ],
  "build": {
    "target": "es2022",
    "minify": true,
    "port": 5173
  }
}
Output
from pydantic import BaseModel


class Maintainer(BaseModel):
    name: str
    email: str
    active: bool


class Build(BaseModel):
    target: str
    minify: bool
    port: int


class Root(BaseModel):
    name: str
    version: str
    private: bool
    maintainers: list[Maintainer]
    build: Build

Private by design

ParseBox runs entirely in your browser. Your text is never uploaded, logged or stored on a server, so it is safe to paste API responses, tokens and config files.

Related conversions

All 30 formats in ParseBox →