ArkType

The rule the headline and the homepage's board follow, every result behind it, our own benchmark beside it and how to rerun each one.

Every number on this site comes from a benchmark in the repo. This page has the rule the headline and the homepage's board follow, every result behind it, our own benchmark beside it and the commands that rerun each one.

The rule

The headline, the homepage's board and the tables below follow one rule, the same for validation speed, startup and bundle size.

Ranked by geometric mean across other projects' public benchmarks and valibot.dev's login form, which we wrote in each library from Valibot's code: 22 results for validation speed, 2 for startup and 2 for bundle size; the 2 startup results time creating a schema. Each category averages the largest set of results that ArkType, Zod and three more named libraries all ran, in the unit they measure, and ranks every library that ran all of them, in plain order. ArkType is its default precompiled build in all three. We name only libraries with 100k+ npm downloads a week; every place and average counts all of them.

So the headline's words mean these averages, each the first row of a table below:

  • Smallest on average across valibot.dev's login form and schemabenchmarks.dev's download: 1.19 kB gzipped against Typia's 1.52 kB, 21.7% lower.
  • Fastest on average across 22 results from 2 independent benchmarks: 658 CPU instructions per validation against Typia's 2,097, 68.6% lower.
  • Quickest to start on average across 2 results from 2 independent benchmarks: 38 CPU instructions to create a schema against TypeBox's 4,273, 99.1% lower.

When each benchmark was measured has a date per benchmark.

Each choice has a reason:

  • Other projects' benchmarks, because we didn't write them. Each is another project's public suite, cloned at a pinned commit and run as its authors wrote it, with ArkType added the way that suite adds a library. We chose none of their schemas, inputs or measurements. The one exception is in size: valibot.dev's login form is Valibot's code, which we wrote in each other library and size with our own script.
  • The largest set of results that five libraries share, because a library is only compared over results it ran. A graph has five lanes: ArkType, Zod and three more libraries the site names. It averages the largest set of results that ArkType, Zod and three such libraries all ran, so every bar is over the same work. Which results those are depends on who ran what and never on what anyone scored.
  • A geometric mean, because the results span orders of magnitude: one validates an email address, another a whole document. An arithmetic mean would be the largest result with the rest as rounding error. A geometric mean gives every result the same weight, and the ratio of two libraries' means is the mean of their ratios.
  • The unit the benchmark measures. Speed and startup are CPU instructions, counted with perf while the other project's benchmark code runs. An instruction count is the same on a busy machine and on a quiet one, and close to the same on another CPU, so a number here can be checked on a machine that isn't ours. Size is bytes, minified and gzipped.
  • One build of ArkType in all three, because a library that is fastest in one configuration and smallest in another is neither at once. Every row of every graph is the same build: precompiled with the default options, bundled for production.
  • Plain order. A place is a library's position by its mean, lowest first, among every library that ran all of a graph's results, whether the site names it or not. Nothing counts as a tie unless two means are equal.
  • Startup counts creating a schema, because that is what both public startup benchmarks time. A precompiled validator creates its schema when it builds and has nothing left to create when it loads; the graph shows that difference as it was measured. Importing a real app through its first validation is our own startup benchmark.

The lanes the homepage draws are ArkType, the three best-placed other libraries the site names (100k+ npm downloads a week) and Zod. Zod's other entry points, z.compile and Zod Mini, are in the tables below rather than in a second Zod lane.

  • Every benchmark is public. We wrote 1 of the 5 for validation speed, 2 of the 4 for startup and 1 of the 4 for bundle size; the averages above leave those out. They keep valibot.dev's login form, Valibot's code, which we wrote in each library and size with our own script.
  • Each of the 2 independent startup results times creating a schema, which a precompiled build does when it builds. Our own startup benchmarks time importing an app through its first validation (7 results).

The results

Each table has every library its graph ranks, then every result the graph averages, so where another library has the better number on one result, that number is here.

Validation speed

CPU instructions per validation · 22 results from 2 other projects' benchmarks.

PlaceLibraryCPU instructions per validationOur benchmark, ns per validation
1stArkType658123 ns
2ndTypia2,097794 ns
3rdValibot5,6471,875 ns
4thTypeBox7,8323,207 ns
5thZod10,0442,012 ns

Every result the graph averages:

BenchmarkResultArkTypeTypiaValibotTypeBoxZod
schemabenchmarks.devparsing invalid161113k4,64898,596120k
schemabenchmarks.devparsing valid5,98416,79172,5959,78759,823
schemabenchmarks.devstring email valid6477721,0098,7961,150
schemabenchmarks.devstring url valid7551,6941,6709,3102,268
schemabenchmarks.devstring uuid valid5261,3631,7139,2991,480
schemabenchmarks.devstring ipv4 valid2304118218,354727
schemabenchmarks.devstring ipv6 valid8113,2401,1798,7774,263
schemabenchmarks.devstring email invalid3724061,3504,4874,733
schemabenchmarks.devstring uuid invalid232231,1944,2634,411
schemabenchmarks.devstring url invalid3712231,8284,8951,724
schemabenchmarks.devstring ipv4 invalid432401,1834,2624,440
schemabenchmarks.devstring ipv6 invalid471,7041,3614,663957
schemabenchmarks.devvalidation valid5,94316,69473,5589,68360,338
schemabenchmarks.devvalidation invalid29684,49015911,883
ata's validator-benchmarksverdict-valid, user9341,3365,7221,4646,652
ata's validator-benchmarksverdict-valid, order5,45112,49555,43514,98456,695
ata's validator-benchmarksverdict-invalid, user7481,3484,8821,40017,300
ata's validator-benchmarksverdict-invalid, order1,8324,31226,3695,11771,782
ata's validator-benchmarkserrors-invalid, user4,3476,56729,18319,68226,855
ata's validator-benchmarkserrors-invalid, order11,99726,27362,267209k90,019
ata's validator-benchmarksblocked-verdict-valid, user9341,3365,7204,9289,900
ata's validator-benchmarksblocked-verdict-valid, order5,45312,48555,42293,706104k

Not averaged: 21 more public results, from moltar's typescript-runtime-type-benchmarks, schemabenchmarks.dev, Sury's schema benchmark and ata's validator-benchmarks. No set larger than these 22 was run in full by ArkType, Zod and three more libraries the site names.

Startup

CPU instructions to create a schema · 2 results from 2 other projects' benchmarks.

PlaceLibraryCPU instructions to create a schemaOur apps, import to first validation
1stArkType383.90 ms
2ndTypeBox4,27322.9 ms
3rdValibot14,8013.89 ms
4thsury119k—
5thZod895k16.2 ms
6thZod (compiled)1.18M17.5 ms

Each library on each result, including the ones that only ran one:

Libraryschemabenchmarks.dev's initializationSury's build and parse onceGeometric meanPlace
ArkType1691381st
TypeBox119k1534,2732nd
Valibot23,3539,38114,8013rd
sury70,501201k119k4th
Zod878k913k895k5th
Zod (compiled)2.46M563k1.18M6th
@sapphire/shapeshift574k———
ajv20———
Effect Schema176k———
io-ts29,722———
Joi1.14M———
Superstruct42,192———
runtypes11.8M———
Typia298———
Yup1.03M———
Zod Mini750k———
Zod 3507k———

Bundle size

kB gzipped · valibot.dev's login form and schemabenchmarks.dev's download.

PlaceLibrarykB gzipped
1stArkType1.19 kB
2ndTypia1.52 kB
3rdajv1.59 kB
4thSuperstruct1.77 kB
5thValibot1.79 kB
6thruntypes4.94 kB
7thZod Mini5.91 kB
8thYup13.3 kB
9thTypeBox17.6 kB
10thZod24.7 kB
11thEffect Schema44.6 kB
12thJoi53.8 kB

Each library on each result, including the ones that only ran one:

Libraryvalibot.dev's login formschemabenchmarks.dev's downloadGeometric meanPlaceNot averaged: Sury's schema bundled as a check
ArkType0.92 kB1.55 kB1.19 kB1st0.27 kB
Typia1.25 kB1.85 kB1.52 kB2nd—
ajv0.94 kB2.72 kB1.59 kB3rd—
Superstruct1.62 kB1.94 kB1.77 kB4th—
Valibot1.56 kB2.06 kB1.79 kB5th1.20 kB
runtypes5.05 kB4.83 kB4.94 kB6th—
Zod Mini5.12 kB6.82 kB5.91 kB7th—
Yup13.5 kB13.1 kB13.3 kB8th—
TypeBox22.8 kB13.6 kB17.6 kB9th0.21 kB
Zod25.1 kB24.3 kB24.7 kB10th64.7 kB
Effect Schema83.2 kB23.9 kB44.6 kB11th—
Joi54.7 kB52.9 kB53.8 kB12th—
io-ts—3.62 kB———
sury—15.8 kB——11.6 kB
Zod (compiled)—15.6 kB———
Zod 3—13.1 kB———
@sapphire/shapeshift—25.3 kB———

Not averaged: 1 more public result, from Sury's schema bundled as a check. No set larger than these two was run in full by ArkType, Zod and three more libraries the site names.

Every library's result on every row, in every suite, is in leaderboard.json.

When each was measured

BenchmarkOn the boardOther libraries last measuredArkType at
schemabenchmarks.dev14 speed resultsNovember 19, 2026591cc38d7
ata's validator-benchmarks8 speed resultsNovember 19, 2026591cc38d7
schemabenchmarks.dev's initialization1 startup resultNovember 19, 2026591cc38d7
Sury's build and parse once1 startup resultNovember 19, 2026591cc38d7
valibot.dev's login form1 size resultNovember 19, 2026591cc38d7
schemabenchmarks.dev's download1 size resultNovember 19, 2026591cc38d7

A result is only as current as its last run, so each benchmark has its own date, and ArkType's rows name the commit they were measured at. Each month a job reruns the size benchmarks at each library's newest release and opens a pull request with the updated numbers for review, so a number on this site changes only by a reviewed commit.

Our own benchmark

The rule leaves our own benchmark out of every bar, place and superlative, since we wrote it. The homepage prints two figures from it beside the bars, in units most people think in, and the sections below have all of it, including the results where another library is ahead.

Validation speed

Nanoseconds per validation, by the clock, on one core. Each library's geometric mean over the scenarios all of them ran:

PlaceLibraryns per validation, geometric mean of 27 scenariosValidations a second
1stArkType123 ns8.1M
2ndajv187 ns5.3M
3rdArkType (dynamic)272 ns3.7M
4thTypia794 ns1.3M
5thZod (compiled)935 ns1.1M
6thValibot1,875 ns533k
7thZod2,012 ns497k
8thTypeBox3,207 ns312k
9thZod Mini4,219 ns237k

Precompiled ArkType was faster than Zod 4 in all 32 scenarios of our benchmark, by a median of 15×, and faster than Zod 4's z.compile in 32 of 32, by a median of 5.3×. It isn't the fastest at everything. On the rows that report errors for invalid data, ajv was faster on 8 of 15.

Each panel is one scenario, and the table under them has every one:

moltar1.71× ahead of typia7 keys and a nested object: moltar's public benchmark
  1. ArkType4.84 ns1×
  2. ArkTypedynamic4.33 ns1.11× faster
  3. typiaaot8.25 ns1.71×
  4. TypeBoxaot99.5 ns20×
  5. ajvaot14.4 ns2.9×
  6. Zod 4copies143 ns29×
  7. Zod 4compiled· copies16.8 ns3.4×
  8. Valibotcopies477 ns98×
product3.3× ahead of ajv11 keys, a Date, nested arrays of objects
  1. ArkType323 ns1×
  2. ArkTypedynamic326 ns≈ tie
  3. typiaaot2.62 µs8.1×
  4. TypeBoxaot1.4 µs4.3×
  5. ajvaot1.09 µs3.3×
  6. Zod 4copies5.73 µs17×
  7. Zod 4compiled· copies1.34 µs4.1×
  8. Valibotcopies6.32 µs19×
moltar, undeclared keys removed1.38× ahead of Zod 4 compiledwhat Zod and Valibot always do, so every library does the same work
  1. ArkType13 ns1×
  2. ArkTypedynamic13.6 ns1.05×
  3. typiaaot460 ns35×
  4. TypeBoxaot7.66 µs590×
  5. ajvaot611 ns47×
  6. Zod 4140 ns10×
  7. Zod 4compiled17.9 ns1.38×
  8. Valibot468 ns36×
product, undeclared keys removed2× ahead of Zod 4 compiledthe same like-for-like comparison, on product
  1. ArkType650 ns1×
  2. ArkTypedynamic644 ns≈ tie
  3. typiaaot4.15 µs6.3×
  4. TypeBoxaot41.1 µs63×
  5. ajvaot2.82 µs4.3×
  6. Zod 45.7 µs8.7×
  7. Zod 4compiled1.32 µs2×
  8. Valibot6.3 µs9.6×
discriminated union2.2× ahead of TypeBox4 object branches keyed on kind
  1. ArkType4.5 ns1×
  2. ArkTypedynamic4.46 ns≈ tie
  3. typiaaot13.3 ns2.9×
  4. TypeBoxaot10.2 ns2.2×
  5. ajvaot12.1 ns2.6×
  6. Zod 4copies96.6 ns21×
  7. Zod 4compiled· copies16.5 ns3.6×
  8. Valibotcopies437 ns97×
recursive tree1.69× ahead of TypeBox40 nodes, depth 3
  1. ArkType214 ns1×
  2. ArkTypedynamic224 ns1.05×
  3. typiaaot2.3 µs10×
  4. TypeBoxaot363 ns1.69×
  5. ajvaot914 ns4.2×
  6. Zod 4copies8.81 µs41×
  7. Zod 4compiled*· copies8.82 µs41×
  8. Valibotcopies5.34 µs25×
constraints1.32× ahead of ajvemail, regex, length and range bounds
  1. ArkType53 ns1×
  2. ArkTypedynamic52.2 ns1.01× faster
  3. typiaaot177 ns3.3×
  4. TypeBoxaot71.8 ns1.36×
  5. ajvaot70.1 ns1.32×
  6. Zod 4copies551 ns10×
  7. Zod 4compiled· copies70.8 ns1.34×
  8. Valibotcopies465 ns8.7×
items1.09× ahead of typiaan array of 100 small objects
  1. ArkType293 ns1×
  2. ArkTypedynamic277 ns1.05× faster
  3. typiaaot320 ns1.09×
  4. TypeBoxaot371 ns1.26×
  5. ajvaot491 ns1.67×
  6. Zod 4copies4.2 µs14×
  7. Zod 4compiled· copies731 ns2.5×
  8. Valibotcopies16 µs54×

all 16 valid-data scenarios: 15 faster, 0 tied, 1 slower than the fastest other library · every one is in the table below

Median ns per call over 20 passes, each running every library in a fresh process, outputs checked against ArkType's before timing. Ties are a two-sided sign test over paired passes at p ≥ .05; ratios are of the medians, truncated. Node 25.2.1 on an Intel i7-11700 under WSL2, measured 2026-10-24 on 808927feb.

Zod's parse, compiled or not, and Valibot's remove undeclared keys and return a copy, where ArkType, typia, TypeBox and ajv return the input as is. The strip rows compare like for like, since every library removes them there, as do the rows that transform or default their input, where every library returns new output and ArkType's Types remove undeclared keys too. On strip moltar, ArkType is 10× faster than Zod 4, 1.38× faster than Zod 4 compiled and 36× faster than Valibot. On strip product, ArkType is 8.7× faster than Zod 4, 2× faster than Zod 4 compiled and 9.6× faster than Valibot.

Zod 4 compiled on parse tree (marked *) runs Zod's runtime parser, since z.compile refuses recursive schemas. On the first-error rows, arms marked * have no first-error mode and report every error.

Harness and scenarios.

all 32 scenarios, as a table
scenarioArkType precompiledArkType (dynamic)typiaTypeBoxajvZod 4Zod 4 compiledzod/miniValibotfastest otherArkType vs it
parse moltar4.84 ns4.33 ns8.25 ns99.5 ns14.4 ns143 ns16.8 ns771 ns477 nstypia1.71× faster
parse moltar strict18 ns18.3 ns30.3 ns26.7 ns28.9 ns200 ns32.9 ns855 ns531 nsTypeBox1.48× faster
parse product323 ns326 ns2.62 µs1.4 µs1.09 µs5.73 µs1.34 µs10 µs6.32 µsajv3.3× faster
parse items293 ns277 ns320 ns371 ns491 ns4.2 µs731 ns23.6 µs16 µstypia1.09× faster
parse discriminated4.5 ns4.46 ns13.3 ns10.2 ns12.1 ns96.6 ns16.5 ns231 ns437 nsTypeBox2.2× faster
parse rotating5.31 ns7.68 ns7.22 ns6.6 ns17.1 ns92.8 ns23.9 ns133 ns82.7 nsTypeBox1.24× faster
parse constraints53 ns52.2 ns177 ns71.8 ns70.1 ns551 ns70.8 ns973 ns465 nsajv1.32× faster
parse morph17.4 ns17.7 ns—2.83 µs—123 ns22.9 ns112 ns59.5 nsZod 4 compiled1.32× faster
parse defaults7.74 ns7.46 ns—1.14 µs15.6 ns68.2 ns51.4 ns400 ns227 nsajv2× faster
parse items morph1.58 µs1.56 µs—793 µs—17.1 µs2.39 µs35.5 µs21.4 µsZod 4 compiled1.51× faster
parse items defaults1.17 µs1.22 µs—72.2 µs799 ns4.88 µs2.68 µs26.5 µs16.4 µsajv1.45× slower
parse moltar morph21.9 ns21.6 ns—32.7 µs—253 ns33.4 ns905 ns540 nsZod 4 compiled1.52× faster
parse tree214 ns224 ns2.3 µs363 ns914 ns8.81 µs8.82 µs*15.2 µs5.34 µsTypeBox1.69× faster
strip moltar13 ns13.6 ns460 ns7.66 µs611 ns140 ns17.9 ns796 ns468 nsZod 4 compiled1.38× faster
strip product650 ns644 ns4.15 µs41.1 µs2.82 µs5.7 µs1.32 µs10.1 µs6.3 µsZod 4 compiled2× faster
issues moltar75.8 ns287 ns275 ns9.92 µs29.6 ns1.89 µs1.78 µs2.73 µs739 nsajv2.5× slower
issues moltar strict121 ns264 ns1.29 µs14.6 µs70.1 ns2.3 µs2.27 µs3.11 µs898 nsajv1.73× slower
issues product1.21 µs2.47 µs12.3 µs66.7 µs1.33 µs20.5 µs23.6 µs24.3 µs10.3 µsajv1.1× faster
issues items418 ns738 ns3.18 µs438 µs537 ns6.87 µs6.77 µs26.6 µs16.3 µsajv1.29× faster
issues patterns3.33 µs3.43 µs15.8 µs18.3 µs7.51 µs10.4 µs18.4 µs10.1 µs7.85 µsajv2.2× faster
errors moltar101 ns1.19 µs518 ns9.84 µs30.8 ns1.91 µs1.68 µs2.7 µs750 nsajv3.2× slower
errors moltar strict172 ns731 ns1.47 µs14.8 µs71.9 ns2.26 µs2.25 µs3.14 µs903 nsajv2.3× slower
errors product2.26 µs10.3 µs14.8 µs67.8 µs1.35 µs19.3 µs17.9 µs23.7 µs10 µsajv1.66× slower
errors items465 ns1.7 µs3.58 µs330 µs540 ns6.34 µs6.91 µs27.1 µs16.3 µsajv1.16× faster
errors patterns3.38 µs3.74 µs15.9 µs18.7 µs7.5 µs10.4 µs18.2 µs10.1 µs7.92 µsajv2.2× faster
first moltar first-error build91.7 ns1.2 µs*6.03 µs9.92 µs30.4 ns1.8 µs*1.72 µs*2.77 µs*728 nsajv3× slower
first moltar strict first-error build94.6 ns710 ns*6.26 µs6.29 µs32.4 ns2.29 µs*2.21 µs*3.14 µs*716 nsajv2.9× slower
first product first-error build70.6 ns10.2 µs*6.21 µs6.69 µs29 ns20.6 µs*16.6 µs*22.9 µs*390 nsajv2.4× slower
first items first-error build327 ns1.77 µs*7.59 µs173 µs351 ns6.53 µs*6.7 µs*27.2 µs*8.58 µsajv1.07× faster
first patterns first-error build3.37 µs3.7 µs*22.1 µs18.4 µs7.5 µs10.5 µs*17.9 µs*10.2 µs*7.84 µsajv2.2× faster
allows moltar3.75 ns3.74 ns4.84 ns98.3 ns14.2 ns136 ns8.01 ns784 ns461 nstypia1.29× faster
allows moltar invalid3.65 ns3.6 ns4.79 ns98.5 ns29.8 ns239 ns8.52 ns1.01 µs720 nstypia1.31× faster

Beyond it:

  • On moltar's parseSafe benchmark, precompiled ArkType takes the fewest instructions per call, and by wall clock it was faster than each of the six libraries closest to it, Typia among them, in at least 28 of 30 paired runs.
  • On apps we generated of 11 to 1,012 Types, built with esbuild, webpack and Next on Turbopack, the default build validated faster on every one than every other library measured on it (Zod 4 and Valibot on every app, z.compile and ajv on some), by 1.68x or more: nanoseconds per call over 9 paired runs on a shared machine, p ≤ 0.039.
  • On ntwine's packages/shared, the schemas of an open-source app and the code that reads them, bundled with esbuild: the "smallest" preset shipped 129 KB gzipped to Zod 4's 191 KB and Zod 3's 111 KB, the version ntwine ships; it ran 0.205G instructions through its first validation to Zod 4's 0.481G and Zod 3's 0.270G; and the default build validated a thread 11.89x as fast as Zod 4 and 41.17x as fast as Zod 3, in nanoseconds per call over 9 paired runs on a shared machine, p ≤ 0.004. Zod 4 ships less through webpack (119 KB to 125 KB) and through Next on Turbopack (276 KB to 277 KB).

Startup

From just before a fresh process imports an app's bundle to just after its first validation returns. In CPU instructions, beyond what an empty module costs to load:

LibraryformloginmoltarshopGeometric mean of login, moltar, shopPlace
ArkType819k687k940k9.36M1.82M1st
Valibot2.48M2.35M2.29M12.3M4.04M2nd
ajv—1.87M1.61M32.9M4.63M3rd
Typia—2.45M1.34M33.4M4.78M4th
Zod Mini11.5M11.4M10.5M37.0M16.4M5th
Zod44.1M43.7M54.0M102M62.3M6th
Zod (compiled)52.4M51.6M58.6M126M72.5M7th
TypeBox—87.9M89.4M208M118M8th
  • On each of the 4 apps in our startup benchmark, precompiled ArkType's default build ran fewer instructions from import through its first validation than every other library measured on it (Valibot, Zod, Zod (compiled), Zod Mini, Typia, ajv and TypeBox), by 23.8% or more, in at least 17 of 20 paired runs on Node 24.
  • From import through its first validation, the "smallest" preset ran fewer instructions than every other library on every one of those apps, by 2.8% or more through esbuild and webpack and by 2.4% or more on Turbopack, where Next's own startup is in every count, p ≤ 0.004; the default build did on 19 of them.

The same apps by the clock, in milliseconds, which the homepage prints beside its startup bars:

LibraryloginmoltarshopGeometric meanPlace
Valibot3.32 ms3.36 ms5.27 ms3.89 ms1st
ArkType3.34 ms3.07 ms5.79 ms3.90 ms2nd
Typia3.26 ms3.15 ms8.04 ms4.35 ms3rd
ajv3.20 ms3.01 ms8.62 ms4.36 ms4th
Zod Mini5.35 ms5.15 ms10.8 ms6.68 ms5th
Zod12.2 ms13.7 ms25.3 ms16.2 ms6th
Zod (compiled)13.1 ms13.5 ms30.3 ms17.5 ms7th
TypeBox16.8 ms16.5 ms43.3 ms22.9 ms8th
ArkType (dynamic)31.7 ms29.9 ms50.6 ms36.3 ms9th

Most of each of those milliseconds is Node loading a module, which every library pays alike, so the quickest are close together and their order changes from app to app and from machine to machine. Instructions count what a library adds, and a busy machine doesn't move them.

Against dynamic ArkType

On valid data, the precompiled build is within 6% of dynamic ArkType in 14 of 16 scenarios; it's 1.11× slower on moltar and 1.45× faster on rotating. The bigger change is everything before the first call.

PrecompiledDynamic
Cold start, our login form app3.34 ms31.7 ms
Bundle gzipped, valibot.dev's login form0.92 kB98.1 kB

Cold start is our login form app (an email and a password check), bundled and minified with esbuild: the median time for a fresh Node process to import the bundle and validate once, measured 2026-10-23 at 89510709d. Size is valibot.dev's login form, the validators and the library code they import, minified with esbuild and gzipped, at 591cc38d7.

Bundle size

Our own apps, each bundled with esbuild as a production build, minified and gzipped:

LibraryloginmoltarshopsaasGeometric mean of login, moltar, shopPlace
ajv0.63 kB0.76 kB8.84 kB—1.61 kB1st
ArkType1.14 kB1.19 kB5.07 kB9.59 kB1.90 kB2nd
Valibot1.68 kB1.46 kB3.63 kB5.17 kB2.07 kB3rd
Typia1.24 kB1.23 kB16.7 kB—2.94 kB4th
Zod Mini5.11 kB4.71 kB10.2 kB—6.26 kB5th
Zod25.1 kB26.4 kB28.1 kB—26.5 kB6th
Zod (compiled)32.9 kB34.2 kB35.9 kB—34.3 kB7th
TypeBox41.9 kB41.9 kB42.9 kB—42.2 kB8th

On Valibot's own login form, ArkType's default build reports an error for every invalid field, with the form's messages, in a smaller bundle than Valibot: 0.92 kB gzipped against 1.56 kB. Dynamic ArkType is 98.1 kB gzipped, minified with esbuild, up from 47.8 kB in 2.2.9, so precompile to ship less.

With the "smallest" preset, its bundle was smaller than every other library's on 20 of those 22 apps, by 31 B or more; on 11 and 46 Types through webpack with narrows, Valibot's was smaller, by up to 29 B (0.6%). It shipped less than Zod 4 on every one, by 1.18x to 10.28x. The default build, the fastest, shipped 1.25x to 2.48x what "smallest" did.

Size at scale has how each build's bundle grows with the number of Types in it, and where each is the smallest.

Build time

Build time has what precompiling adds to a production build, a dev server and a rebuild.

Precompiled against dynamic

A precompiled validator has to return what dynamic ArkType returns, with the same messages. These are the checks every change to the precompiler passes:

CheckWhat it holds
pnpm testDifferentialEvery Type ArkType's own test suites call, precompiled in each layout, returns what dynamic ArkType returns on every input the suites passed it.
pnpm testPerturbationChange what the build read before the program runs, like a key, an export or a prototype: the precompiled program throws as it starts or still agrees with ArkType.
pnpm testProgramsGenerated programs agree run as written and precompiled, unchanged and under every perturbation.
pnpm testPruneParityA production bundle missing what no code reads validates every input as one built whole does, once negative controls show the check catches a dropped check.
pnpm testHistoryEach test sees the same thing fresh, twice in one process and after a random sample of the others.
pnpm testEnvironmentsA program prints the same in other time zones and locales, on Bun, Deno, Chromium and Firefox.

In your own project, shadow mode runs your tests against both and fails wherever they disagree.

Rerun them

Clone the repo and build it once:

git clone https://github.com/arktypeio/arktype
cd arktype
pnpm i && pnpm build

The board

pnpm benchExternal <suite> clones a benchmark at the commit its published rows were counted on, installs it from its own lockfile, adds ArkType and runs it. Pass --newest (e.g. pnpm benchExternal size --newest) to measure against the newest rival releases shown on the published board. The clones take about 4.5 GB under ark/repo/bench/external/out/clones/.

GraphCommandNeedsTakes
Validation speedpnpm benchExternal sb and pnpm benchExternal ataLinux, perf, tasksetabout 75 minutes
Startuppnpm benchExternal sb and pnpm benchExternal suryLinux, perf, tasksetabout 50 minutes
Bundle sizepnpm benchExternal sizeany OSabout 2 minutes
All of thempnpm benchExternal allLinux, perf, tasksetabout 90 minutes

Instruction counts come from hardware counters, which perf reads on Linux and which most hosted CI runners and virtual machines don't expose. NODE24 and NODE26 name the Node 24 and 26 binaries the suites run on; without them the suites run on the Node that runs the script.

Each run writes its results to ark/repo/bench/external/out/fresh/. Then:

pnpm benchBoard --fresh

prints each graph's standings by the rule above, the published numbers beside what your checkout measured. Without --fresh it prints the published ones alone. It runs the code this site runs, so what it prints for the published results is what the homepage draws.

Expect every other library's bundle to match to the byte, and an instruction count to move by a few percent on another CPU or Node build while the ratios between libraries move less. ArkType's own rows are the commit you check out, and the published ones name theirs.

Our own benchmark

ScriptWhat it rerunsNeedsTakes
pnpm benchTypiaTypia's generated validators, which the next three readany OS1 to 5 minutes
pnpm benchValidateValidation speed, every scenarioany OSabout 10 minutes
pnpm benchImportStartup by the clockany OSunder a minute
pnpm benchSizeBundle size of our appsany OSseconds
pnpm benchExternal startupStartup in instructionsLinux, perf, tasksetabout a minute

benchValidate, benchImport and benchSize write validate.json, import.json and size.json to ark/repo/bench/out/, and pnpm benchBoard --fresh prints them beside the published tables above. Times by the clock are your machine's: compare the ratios between libraries, not the nanoseconds.

pnpm benchSizeScale reruns Size at scale, pnpm benchBigApp the generated apps and ntwine, and pnpm benchBuildTime Build time.

The benchmarks' README has what each suite needs installed, how each library was added to it, the versions every row was measured at and every run's results.