Skip to content

metaschemaFast, zero-dependency schemas for JavaScript

Declare data structures and domain models once as plain objects. Validate and parse them at tens of millions of checks a second, get every problem back as data, and generate TypeScript types and JSON Schema from the same definitions. Node.js and browsers.

metaschema

Benchmarks ​

A check is a function call, and with the JIT backend a straight-line one. The chart runs the object of the moltar suite through metaschema and ten other validators on one machine, each in a fresh process and checked for the right verdicts first. On the JIT metaschema validates 30 to 48 million objects a second, and in the strict modes (unknown keys rejected) only TypeBox's compiler is faster; on its closures, with no eval at all, 4.6 to 9.8 million, ahead of every interpreter in the set. Asked for every issue of an invalid value with its path, it is second only to Ajv, and 6 to 100 times faster than the other TypeScript-first validators.

Nested object, parseStrict
A valid object of 6 fields and a nested object of 3. parseStrict: unknown keys rejected, the value returned. ops/s, log scale, higher is better.
TypeBoxCompile(…).Check()
43.2M
metaschemacheck() · compile(), JIT
29.9M
Ajvcompile(…)(value), draft 2020-12
23.5M
ZodsafeParse()
7.34M
metaschemacheck() · closures
4.81M
ArkTypetype(value) · allows()
4.02M
ValibotsafeParse() · is()
1.8M
Effect SchemadecodeUnknownResult() · is()
1M
Metarhia metaschemacheck() · strict only
550k
Joivalidate(), convert: false
543k
Superstructvalidate() · is()
266k
YupvalidateSync() · isValidSync(), strict
175k
TypeBoxValue.Check()
118k
Apple M3 Max · 16 cores · Node v24.14.1 · median of 5 × 1 s samples, each library in a fresh process · 2026-10-13

Method, every issue of an invalid value, cold start, bundle size and release over release →

Released under the MIT License.