Compliance cases

These are the 7,246 inputs a submission must answer. A conforming implementation returns true for the 2,791 valid ones and false for the 4,455 invalid ones. You can run the suite without reading it, or open any case to see its input and where its first ill-formed byte is.

Well-formed means Table 3-7 of the Unicode Standard, as RFC 3629 restates it: no overlong forms, surrogates, code points above U+10FFFF, stray continuation bytes or sequences cut short. The compliance suite combines Markus Kuhn's UTF-8 stress test, WPT's fatal TextDecoder tests, every lead byte against the edges of its allowed ranges, errors at every offset around 16-, 32- and 64-byte blocks and at the end of every length up to 130 bytes, large inputs, and seeded random text. simdutf, Python and a Table 3-7 reference agree on every answer.

Run the full compliance suite locally. Replace your-component.wasm with your compiled component. Download the suite

curl -fLo validate_utf8.comply.wasm https://calculated.world/comply/validate_utf8.wasm
npx qipok your-component.wasm --suite validate_utf8.comply.wasm
Clear

1,925 of 7,246 cases · 1,057 true · 868 false

Case Name Expected Note Size
005671 generated/0359 Generated false Seeded random text, mutation: truncate. 2 B
005672 generated/0360 Generated false Seeded random text, mutation: truncate. 26 B
005673 generated/0361 Generated true Seeded random text, mutation: flip bit. 287 B
005674 generated/0362 Generated true Seeded random text, mutation: none. 66 B
005675 generated/0363 Generated false Seeded random text, mutation: insert byte. 4 B
005676 generated/0364 Generated false Seeded random text, mutation: replace byte. 56 B
005677 generated/0365 Generated false Seeded random text, mutation: splice bad sequence. 43 B
005678 generated/0366 Generated true Seeded random text, mutation: none. 74 B
005679 generated/0367 Generated false Seeded random text, mutation: replace byte. 7 B
005680 generated/0368 Generated false Seeded random text, mutation: insert byte. 265 B
005681 generated/0369 Generated false Seeded random text, mutation: insert byte. 80 B
005682 generated/0370 Generated true Seeded random text, mutation: none. 202 B
005683 generated/0371 Generated false Seeded random text, mutation: splice bad sequence. 102 B
005684 generated/0372 Generated false Seeded random text, mutation: splice bad sequence. 344 B
005685 generated/0373 Generated false Seeded random text, mutation: truncate. 2 B
005686 generated/0374 Generated true Seeded random text, mutation: none. 75 B
005687 generated/0375 Generated false Seeded random text, mutation: replace byte. 7 B
005688 generated/0376 Generated false Seeded random text, mutation: truncate. 2 B
005689 generated/0377 Generated true Seeded random text, mutation: truncate. 33 B
005690 generated/0378 Generated true Seeded random text, mutation: none. 311 B
005691 generated/0379 Generated true Seeded random text, mutation: none. 13 B
005692 generated/0380 Generated true Seeded random text, mutation: none. 399 B
005693 generated/0381 Generated false Seeded random text, mutation: truncate. 74 B
005694 generated/0382 Generated true Seeded random text, mutation: flip bit. 11 B
005695 generated/0383 Generated true Seeded random text, mutation: none. 277 B
005696 generated/0384 Generated true Seeded random text, mutation: none. 16 B
005697 generated/0385 Generated true Seeded random text, mutation: none. 10 B
005698 generated/0386 Generated false Seeded random text, mutation: delete byte. 59 B
005699 generated/0387 Generated true Seeded random text, mutation: delete byte. 4 B
005700 generated/0388 Generated false Seeded random text, mutation: insert byte. 4 B
005701 generated/0389 Generated true Seeded random text, mutation: flip bit. 9 B
005702 generated/0390 Generated false Seeded random text, mutation: splice bad sequence. 125 B
005703 generated/0391 Generated false Seeded random text, mutation: insert byte. 314 B
005704 generated/0392 Generated false Seeded random text, mutation: splice bad sequence. 226 B
005705 generated/0393 Generated false Seeded random text, mutation: replace byte. 19 B
005706 generated/0394 Generated true Seeded random text, mutation: none. 337 B
005707 generated/0395 Generated false Seeded random text, mutation: insert byte. 302 B
005708 generated/0396 Generated false Seeded random text, mutation: delete byte. 85 B
005709 generated/0397 Generated true Seeded random text, mutation: none. 316 B
005710 generated/0398 Generated true Seeded random text, mutation: none. 244 B
005711 generated/0399 Generated true Seeded random text, mutation: delete byte. 349 B
005712 generated/0400 Generated true Seeded random text, mutation: flip bit. 39 B
005713 generated/0401 Generated false Seeded random text, mutation: splice bad sequence. 69 B
005714 generated/0402 Generated true Seeded random text, mutation: none. 12 B
005715 generated/0403 Generated true Seeded random text, mutation: flip bit. 26 B
005716 generated/0404 Generated false Seeded random text, mutation: flip bit. 37 B
005717 generated/0405 Generated true Seeded random text, mutation: none. 4 B
005718 generated/0406 Generated true Seeded random text, mutation: none. 12 B
005719 generated/0407 Generated true Seeded random text, mutation: flip bit. 361 B
005720 generated/0408 Generated true Seeded random text, mutation: flip bit. 4 B

Where these rules come from

Well-formed UTF-8 is defined by Table 3-7 of the Unicode Standard, chapter 3 , which RFC 3629 restates as ABNF. Every answer is agreed by simdutf 9.4.0, Python’s strict codec and a direct reading of the table; the suite’s own tests add Node.js’s buffer.isUtf8 and a fatal TextDecoder.