# StefanTerdell/zod-to-json-schema

Converts Zod schemas to Json schemas

Repository: https://github.com/StefanTerdell/zod-to-json-schema
Canonical: https://ross.abutalabs.com/products/zod-to-json-schema
Language: TypeScript
License: ISC
License Family: permissive
Topics: zod, json-schema
Archived: true
Last push: 2026-03-27T07:12:41+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 74, release rhythm 8, longevity 100
- inputs: {"age_days": 2016, "days_push": 159, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1251, forks 93 (observed 2026-08-28T04:04:08.308235+00:00)

## What it is
A TypeScript library that converts Zod schemas into JSON Schema documents, with support for recursive $refs, OpenAPI 3.0 targeting, and OpenAI strict mode. It is deprecated as of November 2025 in favor of Zod v4's native JSON Schema support.

## Use cases
- convert zod schemas to  schema
- generate  schema from zod validation types
- produce openapi 3.0 schemas from zod
- create openai strict mode schemas from zod
- share api request validation schemas as  schema
- resolve recursive zod schemas into  schema refs

## When to choose
- you are on Zod v3 and need JSON Schema output
- you need OpenAPI 3.0 or OpenAI strict mode compatible schemas
- you cannot yet migrate to Zod v4

## When to avoid
- you are using Zod v4, which natively generates JSON schemas
- you need a long-term maintained dependency
- you need conversions in the other direction (use -schema-to-zod)

## Facets
- artifact type: library
- maturity: maintenance
- function: serialization, developer-tools
- domain: developer-tools, apis, web-development
- platform: cross-platform
- tags: zod, -schema, schema-conversion, openapi, deprecated, nodejs

## Member repositories
- StefanTerdell/zod-to-json-schema (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:08.308235+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:07:37.637130+00:00, confidence not recorded.
  - readme: https://github.com/StefanTerdell/zod-to-json-schema (fetched 2026-08-28T04:04:08.308235+00:00, sha a38729ef5d4b)
  - registry_npm: https://registry.npmjs.org/zod-to-json-schema (fetched 2026-08-29T12:18:25.756928+00:00, sha 5423a89d64de)
- Data as of 2026-08-30T08:39:29.467469+00:00.
