Skip to content

JSON Schema to TypeScript

JSON Schema (RFC 7159) is the standard way to describe JSON structure. Convert a JSON Schema to TypeScript types - field descriptions become JSDoc comments, format constraints become refined types where possible, required fields are non-optional.

When to use this

Use when: integrating with an OpenAPI / Swagger spec (it's based on JSON Schema), converting backend-defined schemas to frontend types, generating types from JSON Schema validation libraries (Ajv, joi), reverse-engineering schemas from public APIs that publish them.

Frequently Asked Questions

Is this compatible with OpenAPI / Swagger?

Yes - OpenAPI uses JSON Schema for its `components.schemas` section. Extract that section, paste it here, get TypeScript types. For full OpenAPI-to-TS (including endpoint signatures), use openapi-typescript CLI instead.

Powered by JSON to TypeScript.

Other targeted versions of this tool — each tuned for a specific use case.

Or use the main JSON to TypeScript if your use case isn't covered above.