zod-to-json-schema
npmv3.25.2TypeScriptConverts 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.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
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.
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.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| zod-to-json-schemathis page | 0 | 1 | ISC | 5 months ago |
| fastify | 12.6M | 4 | MIT | 4 days ago |
| @fastify/merge-json-schemas | 0 | 1 | MIT | 4 days ago |
| json-schema | 0 | 2 | (AFL-2.1 OR BSD-3-Clause) | 4 days ago |
| json-schema-ref-resolver | 0 | 1 | MIT | 4 days ago |
| json-schema-typed | 0 | 1 | BSD-2-Clause | 4 days ago |
Dependencies
Declared by zod-to-json-schema v3.25.2. Runtime dependencies are installed with the package; dev dependencies are not.
Peer (1)
Dev (11)
Used by
Popular packages that depend on zod-to-json-schema.
Relationship graph
Dependencies (left) and dependents (right) of zod-to-json-schema.
Frequently installed together
TypeScript-first schema declaration and validation library with static type inference
Create and parse HTTP Content-Type header
An AST-based pattern checker for JavaScript.
Get and validate the raw body of a readable stream.
Fast, unopinionated, minimalist web framework
Prettier is an opinionated code formatter
Next generation testing framework powered by Vite
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
Node.js CORS middleware
TypeScript definitions for node
TypeScript definitions for ws
TypeScript definitions for cors
Release history
11 releases in the last two years, typically about 43 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.25.2latest | 5 months ago | 214 KB | ISC |
| 3.25.2-beta.0 | 5 months ago | 214 KB | ISC |
| 3.25.1 | 8 months ago | 214 KB | ISC |
| 3.25.0 | 9 months ago | 12 MB | ISC |
| 3.24.6 | 1 year ago | 213 KB | ISC |
| 3.24.5 | 1 year ago | 207 KB | ISC |
| 3.24.4 | 1 year ago | 2.2 MB | ISC |
| 3.24.3 | 1 year ago | 2.2 MB | ISC |
| 3.24.2 | 1 year ago | 2.2 MB | ISC |
| 3.24.1 | 1 year ago | 183 KB | ISC |
| 3.24.0 | 1 year ago | 180 KB | ISC |
| 3.23.5 | 1 year ago | 176 KB | ISC |
| 3.23.4 | 1 year ago | 175 KB | ISC |
| 3.23.3 | 2 years ago | 173 KB | ISC |
| 3.23.2 | 2 years ago | 176 KB | ISC |
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
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.