{ }

json2types

Paste a few sample JSON payloads. Get clean TypeScript interfaces and Python Pydantic models, merged across every sample.

100% offline. Nothing you paste leaves this browser tab, unlike the converter sites.

1. Your samples

More samples means better types. Fields missing from some samples become optional, and mixed types become unions.

Tip: you can also paste several JSON objects into one box separated by a line containing only --- and they will be treated as separate samples.

2. Your types

Nested objects become their own named types in both languages.

// Your TypeScript interfaces will appear here.