JSON to Types

Generate types, serializers, validation schemas and Mermaid diagrams from a JSON sample.

Runs locally in your browser. Your input is not uploaded or saved.

Types describe the supplied sample. Every array entry is considered; fields missing from some object entries become optional. Dates, UUIDs and URLs remain strings. A sample cannot establish every allowed value or whether a field is always required.

Strict JSON only. Need to format JSON or convert a Python dictionary? Open JSON Formatter.

Up to 100,000 characters, 10,000 values, 40 nesting levels and 200 object shapes. Duplicate keys keep the last value. Numbers use JavaScript parsing; large integers outside its safe range are rejected.

Also useful