Performance benchmark for Node.js JSON-schema validators.
Also tests against official JSON-schema test suite, version draft6. and checks for validators that cause side-effects on schema or data. The top 6 validators that fail the least tests are included in the benchmark.
|Validator||Relative speed||Number of test runs per second|
||100%||17000 (± 0.34%)|
||69.2%||11760 (± 0.89%)|
||51.5%||8757 (± 0.37%)|
||13.1%||2223 (± 1.24%)|
||5.1%||865 (± 1.15%)|
||1.2%||198 (± 1.11%)|
884 tests are run in each test run.
(validators not in the results above where excluded because of failing tests - see below for details)
ajv is currently the fastest JSON-schema validator out there.
Test failure summary
This test suite uses the official JSON-schema test suite, version draft6.
If a validator does not pass a test in the official test suite, it will show up in these results.
|Validator||Number of failing tests (click for details)|
Some validators have deliberately chosen not to support parts of the spec. Go to the homepage of the validator to learn if that is the case for these tests.
Number of tests that caused side-effects. The schema or data was altered by the validator.
|Validator||Number of side-effects (BAD)|
Validators not in the list have no side-effects on data or schemas.
Tests for other JSON-schema versions
Features of validators
Note that these benchmarks and tests do not take into account other more advanced features of the validators. I encourage you to take a look at each validator if you are looking for special features.
Benchmarks by validator authors and others
Several of the validators have build benchmarks themselves. They are more detailed then the benchmarks provided above.
There is also a benchmark suite by cosmicrealms.