JSON Schema to TypeScript
Input
Paste or drop your data here, or open a file.
New to Bracely?
Everything stays in your browser.
Compare with
Output
JSON Schema to TypeScript
Already have a JSON Schema? Paste it to get the types for your code: required properties stay required, the rest become optional, and every $ref and nested object becomes its own type.
How do I use the JSON Schema to TypeScript?
- Paste a JSON Schema (draft 4 to 2020-12).
- Pick the language: TypeScript, Zod, Go, Python, Pydantic, Java, C#, Rust and more.
- Copy or save the code.
What does the JSON Schema to TypeScript do?
- $ref to $defs and definitions, including a schema that refers to itself
- allOf merged into one type
- type: ["string", "null"], nullable and anyOf with null as nullable
- enum and const typed from their values
- required decides what's optional
- The same 25 languages as models from a sample
Frequently asked questions
- Which drafts are supported?
- Draft 4, 6 and 7, 2019-09 and 2020-12: properties, required, items, $ref inside the document, allOf, anyOf, oneOf, enum and const. References to other files aren't fetched.
- Is my data uploaded?
- No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.
More JSON tools
Bracely has more than 65 JSON tools in one page. Related ones:
- OpenAPI to TypeScript
- GraphQL to TypeScript
- Avro to code
- JSON to TypeScript
- JSON Schema Generator
- JSON to Go
- JSON to Java
- JSON to C#
- JSON to Python
- JSON to Kotlin
- JSON to Swift
- JSON to Dart
- JSON to Rust
- JSON to PHP
- JSON to plain text
- cURL to JSON
- Edge-case test data
- Password generator
- JSON Formatter
- JSON Validator
- JSON Viewer
- JSON Repair
- JSON Diff
- JSON to YAML
- JSON to CSV
- jq Playground
Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut. About · Privacy policy
Last updated · Version 4.9 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram