Ajv

The fastest JSON Schema validator for Node.js and the browser, compiling schemas straight into executable validation code.

Library
npm
v8.20.0
14,840 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
63 /100 Good
Development Activity 40
Maintenance 44
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
81 /100 Excellent
Architecture 85
Code Quality 88
Innovation 82
Learning Curve 70

Ajv (Another JSON Schema Validator) turns JSON Schema documents into compiled JavaScript validation functions rather than interpreting them at runtime, which is why it consistently benchmarks as the fastest validator in the ecosystem. It supports JSON Schema draft-04 through 2020-12 plus JSON Type Definition (RFC 8927), along with OpenAPI extensions like discriminator and nullable.

Beyond pure validation, Ajv can coerce data types, assign defaults to missing properties, remove additional properties, and generate standalone validation code with no runtime dependency on Ajv itself. Its TypeScript-first API infers static types from JSONSchemaType and JTDSchemaType definitions, and a large plugin ecosystem (ajv-formats, ajv-keywords, ajv-i18n) extends it with formats, custom keywords, and localized error messages.

What You Get

  • A compile()/validate() API that turns any JSON Schema (draft-04 to 2020-12) into a reusable, highly optimized validation function
  • First-class JSON Type Definition (RFC 8927) support alongside JSON Schema, including its own meta-schema
  • Data modification during validation: coercing types, assigning defaults, and removing additional properties
  • Standalone code generation so compiled validators can be exported as plain JS with zero Ajv runtime dependency
  • A TypeScript API that infers static types from JSONSchemaType<T>/JTDSchemaType<T> schema definitions
  • An extensible keyword and format system, backed by companion packages (ajv-formats, ajv-keywords, ajv-i18n) for additional formats, keywords, and translated error messages

Common Use Cases

  • Validating incoming request bodies and query params in Node.js API servers before they reach business logic
  • Enforcing config file and environment schema correctness at application startup
  • Powering OpenAPI/Swagger request and response validation middleware
  • Client-side form and payload validation in the browser using the same schema as the backend
  • Generating standalone, dependency-free validation functions for edge/serverless environments where bundle size matters

Under The Hood

Architecture Ajv’s core (lib/ajv.ts, lib/core.ts) drives a compile pipeline where SchemaEnv/compileSchema in lib/compile/index.ts resolve and cache schemas by $id, lib/compile/validate walks the schema tree emitting imperative validation logic through a custom intermediate representation in lib/compile/codegen, and per-keyword handlers registered as vocabularies (lib/vocabularies/{applicator,core,validation,format,jtd}) each contribute codegen fragments that are assembled into one JavaScript function, later instantiated via new Function or exported as standalone source through lib/standalone.

Tech Stack Written in strict TypeScript (5.3) compiled to a small, dependency-light runtime — fast-deep-equal, fast-uri, json-schema-traverse, and require-from-string are the only production dependencies — with Rollup producing browser bundles, Karma running cross-browser tests, and ESLint/Prettier configured via the shared @ajv-validator/config package.

Code Quality The spec/ directory holds 73 spec files covering async validation, discriminator, dynamic $ref, JTD, and codegen internals, plus the official JSON-Schema-Test-Suite pulled in as a git submodule for cross-implementation conformance; naming is consistent and domain-specific (SchemaEnv, KeywordCxt, ValidationRules), and nyc-based coverage is wired into npm run test-cov.

API Design The public surface is compact — Ajv, Ajv2019, Ajv2020, and AjvJTD classes with chainable compile/addSchema/addFormat/addKeyword methods — and JSONSchemaType<T>/JTDSchemaType<T> generics let a single schema double as a compile-time TypeScript type, cutting boilerplate; the tradeoff is that mastering the keyword/vocabulary extension API and the type-inference generics requires reading the docs rather than guessing from the API shape alone.

Used by 67 apps in this directory

TypeScript
100%
Other

Activepieces

AI Assistants · Automation · Mcp

24,756

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript 100%
Updated 4 days ago
TypeScript
56%
Other

agenta

AI Development · Developer Tools · Devops

4,788

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript 56%
Python 39%
Updated 5 days ago
Rust
65%
Apache 2.0

agentgateway

AI Development · Developer Tools · Mcp

5,071

An open source AI-native proxy that secures, observes, and governs agent-to-LLM, agent-to-tool, and agent-to-agent communication through MCP, A2A, and unified LLM routing.

View details
88
Repo Health
82
Technical
69
Dependency
Built with
Rust 65%
Go 23%
Updated 5 days ago
Python
47%
Other

Airbyte

Data Engineering · Developer Tools

22,143

Open-source ELT platform with 600+ connectors for moving data from any source to warehouses, lakes, and AI agents.

View details
95
Repo Health
80
Technical
67
Dependency
Built with
Python 47%
Kotlin 43%
Updated 4 days ago
TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
96%
Other

Amplication

AI Code Assistants · Automation · Developer Tools

16,015

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
58
Repo Health
84
Technical
60
Dependency
Built with
TypeScript 96%
Updated 3 months ago
TypeScript
89%
Other

anytype-ts

Collaboration · Knowledge Management · Note Taking

8,861

A local-first, end-to-end encrypted knowledge OS that lets you build notes, tasks, wikis, and entire apps — with your data stored offline and synced peer-to-peer.

View details
88
Repo Health
78
Technical
67
Dependency
Built with
TypeScript 89%
Updated 1 weeks ago
Rust
86%
Other

Arroyo

Analytics · Data Engineering

5,039

A distributed stream processing engine written in Rust that lets you write SQL to run stateful, real-time computations over data streams with subsecond results.

View details
86
Repo Health
74
Technical
62
Dependency
Built with
Rust 86%
Updated 1 weeks ago
TypeScript
49%
MPL 2.0

Artillery

Developer Tools · Devops

9,083

Cloud-scale load testing and functional testing for APIs, WebSockets, gRPC, and headless browsers, distributed across AWS Lambda or Fargate with zero infrastructure to manage.

View details
89
Repo Health
73
Technical
68
Dependency
Built with
TypeScript 49%
JavaScript 48%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers