
Ajv
Ajv is a free JavaScript library that validates JSON data against JSON Schema and JSON Type Definition schemas.
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, along with JSON Type Definition. Compiled validators can act as TypeScript type guards, and Ajv provides TypeScript utility types for schemas and data. For JTD schemas, it can compile parsers and serializers. Ajv runs server-side in Node.js and in browsers, with documented use in Electron apps and WeChat mini-apps. It can also generate standalone validation code for application deployment. Plugins include ajv-formats, ajv-errors, and ajv-i18n; format validation comes from ajv-formats. The project uses the MIT License. Documentation warns that untrusted schemas may create performance or security risks and recommends limiting size and depth. Browser runtime compilation under Content Security Policy requires unsafe-eval, while standalone code is an alternative. Support is also available through Tidelift.
Good
- Free under the MIT License
- Supports multiple JSON Schema drafts
- Reusable compiled validation functions
- TypeScript type guard support
- Standalone deployment code
Watch out
- Untrusted schemas can pose security risks
- Browser CSP runtime compilation needs unsafe-eval
- Format checks require separate plugin
- No hosted service or usage limits stated
Who it suits
It suits developers validating JSON in Node.js, browsers, Electron, WeChat mini-apps, or self-hosted applications. TypeScript users can use compiled validators as type guards.
Verdict
Ajv provides broad schema validation and compilation options for JavaScript projects at no software cost. Developers should account for CSP requirements, untrusted schema risks, and the separate format plugin.
Plans and prices
From Ajv's own pricing page, checked 8 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Ajv | Free | JavaScript JSON Schema and JSON Type Definition validation · no hosted service or usage limits stated · Free to use under the MIT License |
The facts
Each one read from Ajv's own pages, with the date it was checked.
Where it runs
- 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.checked 8 Oct 2026
What it does
- Creator
- The project news identifies Evgeny Poberezkin as Ajv's creator.checked 8 Oct 2026
- Deployment
- Ajv can run server-side in Node.js or in browsers, and can generate standalone validation code for deployment with an application.checked 8 Oct 2026
- 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.checked 8 Oct 2026
- 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.checked 8 Oct 2026
- JSON parsing and serialization
- Ajv can compile parsers and serializers from JSON Type Definition schemas.checked 8 Oct 2026
- License
- The project is distributed under the MIT License, which permits use, copying, modification, distribution, sublicensing, and sale subject to its terms.checked 8 Oct 2026
- Performance
- Ajv generates optimized validation functions, and its documented model compiles schemas once for repeated validation.checked 8 Oct 2026
- Security
- Ajv warns that schemas from untrusted sources can create performance and security risks and recommends limiting schema size and depth.checked 8 Oct 2026
- Standards
- It supports JSON Schema drafts 04, 06, 07, 2019-09, and 2020-12, as well as JSON Type Definition.checked 8 Oct 2026
- Support
- Ajv is included in a Tidelift subscription for centralized support in addition to support from maintainers.checked 8 Oct 2026
- TypeScript
- Compiled validation functions can act as type guards, and Ajv provides TypeScript utility types for schemas and data.checked 8 Oct 2026
- What it does
- Ajv validates JSON data against declarative JSON Schema or JSON Type Definition schemas by compiling them into JavaScript code.checked 8 Oct 2026
Alternatives to Ajv
- 1

JSONZen
Free planWebAPILinuxmacOS7.6$1 one-time - 2
jaq
Free planOpen sourceWebAPILinuxmacOS7.5Free plan - 3
jq
Free planWebLinuxmacOSSelf-hosted7.2Free plan - 4
Dadroit JSON Viewer
Free planWebLinuxmacOSWindows6.9From $98 a year - 5

BracketView
Free planWebLinuxWindows6.7From $27 a year - 6
jidoujisho
Free planAndroid6.6Free plan
