Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Ajv

ajv.js.org

  • Free plan
  • Web
  • Self-hosted
7.2 Club score Visit ajv.js.org

What Ajv is

Ajv is a free JavaScript library that validates JSON data against JSON Schema and JSON Type Definition schemas. It compiles schemas into JavaScript validation functions that can be reused for repeated checks. Supported JSON Schema drafts include 04, 06, 07, 2019-09, and 2020-12, alongside JSON Type Definition. Compiled validators can work as TypeScript type guards, and utility types support schemas and data. Ajv can also compile parsers and serializers from JTD schemas. It runs server-side in Node.js or in browsers, with documented integrations for Electron and WeChat mini-apps. Standalone validation code can be generated for deployment with an application. Plugins include ajv-formats, ajv-errors, and ajv-i18n. Format checks come from ajv-formats separately. Browser runtime compilation under Content Security Policy requires unsafe-eval; standalone code is an alternative. Ajv warns that untrusted schemas can create performance and security risks.

Who it suits

Ajv suits developers who need schema validation in Node.js, browsers, or self-hosted applications. It is particularly relevant for TypeScript projects and repeated validation workloads.

Good to know, and what to watch

  • Free under the MIT License
  • Supports multiple JSON Schema drafts and JTD
  • Compiles reusable validation functions
  • Provides TypeScript type guards and utility types
  • Can generate standalone validation code
  • Browser runtime compilation may require unsafe-eval
  • Format validation needs a separate plugin
  • Untrusted schemas can create security risks
  • No hosted service is stated

Ajv

Free

Free plan

The verdict

Ajv offers broad schema support, compiled validators, and TypeScript-oriented tooling at no license cost. Review the browser CSP and untrusted-schema cautions when planning deployment.

What the maker publishes

Browser CSP limitation
Runtime compilation in a browser with Content Security Policy requires 'unsafe-eval'; standalone precompiled code is an alternative described by the docs. source
Creator
The project news identifies Evgeny Poberezkin as Ajv's creator. source
Deployment
Ajv can run server-side in Node.js or in browsers, and can generate standalone validation code for deployment with an application. source
Format validation limitation
JSON Schema formats are supplied by the separate ajv-formats plugin, and the docs caution that some format regular expressions may be unsafe with untrusted data. source
Integrations
Ajv documents use in Node.js, browsers, Electron apps, and WeChat mini-apps, and provides plugins such as ajv-formats, ajv-errors, and ajv-i18n. source
JSON parsing and serialization
Ajv can compile parsers and serializers from JSON Type Definition schemas. source
License
The project is distributed under the MIT License, which permits use, copying, modification, distribution, sublicensing, and sale subject to its terms. source
Performance
Ajv generates optimized validation functions, and its documented model compiles schemas once for repeated validation. source
Security
Ajv warns that schemas from untrusted sources can create performance and security risks and recommends limiting schema size and depth. source
Standards
It supports JSON Schema drafts 04, 06, 07, 2019-09, and 2020-12, as well as JSON Type Definition. source
Support
Ajv is included in a Tidelift subscription for centralized support in addition to support from maintainers. source
TypeScript
Compiled validation functions can act as type guards, and Ajv provides TypeScript utility types for schemas and data. source
What it does
Ajv validates JSON data against declarative JSON Schema or JSON Type Definition schemas by compiling them into JavaScript code. source

Checked against the maker's pages on 8 Oct 2026.