TypeScript to JSON Schema Converter
Convert TypeScript interfaces and type definitions directly to valid Draft-07 JSON Schema specifications. · Updated
typescript
json
Draft saved locally.
FAQ
How are optional properties handled?
Properties with `?` (e.g. `tags?: string[]`) are omitted from the JSON Schema `required` array, while non-optional properties are automatically included.
How are TypeScript string union literals converted?
Union literals (like `"admin" | "editor"`) are translated into JSON Schema `enum: ["admin", "editor"]` arrays.
Related tools
JSON to TypeScript
Generate strongly typed TypeScript interfaces and type aliases from sample JSON documents instantly.
JSON Schema Validator
Validate JSON documents against JSON Schema definitions using Ajv. Path-accurate structural error reports.
JSON Validator
Instantly validate JSON syntax, identify errors with exact line and column locations, and fix formatting bugs.
JSON Formatter
Format, validate, and explore JSON with a collapsible tree view.