</>PackageGraphPackageGraph

zod-to-json-schema

npmv3.25.2TypeScript

Converts Zod schemas to Json Schemas

Safe to adopt

Yes — zod-to-json-schema scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 167 days ago. 14 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • BMaintenance: grade B, Good.

    Last published 167 days ago. 14 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 214 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    ISC — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding zod-to-json-schema to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

214 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
No constraint declared
Module format
ESM + CommonJS
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the zod-to-json-schema README.

typescriptFull README ↗
import { z } from "zod"; // Or, using v3.25 or v4, "zod/v3"
import { zodToJsonSchema } from "zod-to-json-schema";

const mySchema = z
  .object({
    myString: z.string().min(5),
    myUnion: z.union([z.number(), z.boolean()]),
  })
  .describe("My neat object schema");

const jsonSchema = zodToJsonSchema(mySchema, "mySchema");

zod-to-json-schema vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
zod-to-json-schemathis page01ISC5 months ago
fastify12.6M4MIT4 days ago
@fastify/merge-json-schemas01MIT4 days ago
json-schema02(AFL-2.1 OR BSD-3-Clause)4 days ago
json-schema-ref-resolver01MIT4 days ago
json-schema-typed01BSD-2-Clause4 days ago

Dependencies

Declared by zod-to-json-schema v3.25.2. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (11)

@types/json-schema ^7.0.9@types/node ^20.9.0ajv ^8.6.3ajv-errors ^3.0.0ajv-formats ^2.1.1fast-diff ^1.3.0local-ref-resolver ^0.2.0rimraf ^6.1.3tsx ^4.19.0typescript ^5.1.3zod ^3.25.28 || ^4

Used by

Popular packages that depend on zod-to-json-schema.

Relationship graph

Dependencies (left) and dependents (right) of zod-to-json-schema.

zod@modelcontextprot…zod-to-json-schema
zod-to-json-schema dependencies dependents

Frequently installed together

Release history

11 releases in the last two years, typically about 43 days apart.

Recent versions of zod-to-json-schema
VersionPublishedSizeLicense
3.25.2latest5 months ago214 KBISC
3.25.2-beta.05 months ago214 KBISC
3.25.18 months ago214 KBISC
3.25.09 months ago12 MBISC
3.24.61 year ago213 KBISC
3.24.51 year ago207 KBISC
3.24.41 year ago2.2 MBISC
3.24.31 year ago2.2 MBISC
3.24.21 year ago2.2 MBISC
3.24.11 year ago183 KBISC
3.24.01 year ago180 KBISC
3.23.51 year ago176 KBISC
3.23.41 year ago175 KBISC
3.23.32 years ago173 KBISC
3.23.22 years ago176 KBISC

Overview

zod-to-json-schema is an npm package that converts Zod schemas to Json Schemas. It has 1 known dependents in the graph. The latest version is 3.25.2, released under the ISC license.

Who should use it

Teams working in the npm ecosystem who need converts Zod schemas to Json Schemas and value a focused solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (ISC).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use zod-to-json-schema?

Yes — zod-to-json-schema scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 167 days ago. 14 releases in the last 2 years.

How do I install zod-to-json-schema?

Run `npm install zod-to-json-schema` to add zod-to-json-schema to your npm project.

What license is zod-to-json-schema released under?

zod-to-json-schema is distributed under the ISC license.

How popular is zod-to-json-schema?

npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on zod-to-json-schema.

Is zod-to-json-schema still maintained?

The most recent release of zod-to-json-schema (v3.25.2) was published 5 months ago.

Does zod-to-json-schema run install scripts?

No. zod-to-json-schema does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.