Data tools
JSON to Types
Generate TypeScript, Go or Python types from a local JSON (JavaScript Object Notation) example.
Runs locallyRuns locally in your browser
Guide
Generate a starting set of TypeScript, Go or Python types from a JSON (JavaScript Object Notation) example. The types describe the values present in your sample, so review them before using them for other documents.
- Add your document
Paste into Input, choose an example or use Open file. You can also drop one local text file into Input.
- Choose and run
Choose Language, set Root name if needed and select Generate. Types describe the example, not every possible document.
- Read and keep the result
Read Output. On a phone, select the Output tab. Use Copy output or Download to keep the result. Clear removes both fields.
On mobile, choose Output to read the result. Clear removes both fields.
Language
- TypeScript: generate types and interfaces for the example document.
- Go: generate structures with document field names preserved in tags.
- Python: generate classes with type hints. Field names may become valid Python identifiers; these are not serializers.
Root name
- Root name: start with a letter, then use letters, digits or underscores; up to 64 characters. The generator may adjust reserved names. This name is not saved.
Shortcuts
- Ctrl / Cmd + Enter — Run selected action
- Ctrl / Cmd + Shift + C — Copy output
- Ctrl / Cmd + S — Download output
- ? — Show shortcuts outside text fields
Shortcuts work while focus is in the workspace. Copy and download need valid output.
Common questions
- Does this run my code?
- No. Code is parsed and rewritten locally, never executed. Markup stays text; links, scripts and images are not opened.
- Is my document saved or uploaded?
- No. Input, results, root names and filenames stay in this tab and are not remembered between visits. Only safe language and formatting choices may be stored on this device.
- What are the limits?
- Input is limited to 1 MB and output to 2 MB. Processing stops after five seconds. Type generation also allows up to 100 nesting levels and 10,000 values including containers. Large results use a preview; Download keeps the full successful output.
- What does this check?
- Generated types are an example-based starting point, not a runtime validator or serializer. Null, empty and missing values cannot describe all future data. Review the result before using it. Examples that cannot produce a named type show an error; try an object or an array of objects. Go rejects property names containing a backtick.
Was this tool helpful?
Only your rating and optional feedback are sent. Your tool input and output are never included.