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
005971 generated/0672 Generated false Seeded random text, mutation: flip bit. 4 B
005972 generated/0673 Generated false Seeded random text, mutation: truncate. 18 B
005973 generated/0674 Generated false Seeded random text, mutation: splice bad sequence. 359 B
005974 generated/0675 Generated true Seeded random text, mutation: none. 390 B
005975 generated/0676 Generated false Seeded random text, mutation: replace byte. 222 B
005976 generated/0677 Generated false Seeded random text, mutation: truncate. 9 B
005977 generated/0678 Generated true Seeded random text, mutation: none. 7 B
005978 generated/0679 Generated false Seeded random text, mutation: replace byte. 221 B
005979 generated/0680 Generated false Seeded random text, mutation: insert byte. 328 B
005980 generated/0681 Generated true Seeded random text, mutation: none. 58 B
005981 generated/0682 Generated false Seeded random text, mutation: replace byte. 366 B
005982 generated/0683 Generated true Seeded random text, mutation: none. 6 B
005983 generated/0684 Generated true Seeded random text, mutation: replace byte. 272 B
005984 generated/0685 Generated false Seeded random text, mutation: delete byte. 289 B
005985 generated/0686 Generated false Seeded random text, mutation: splice bad sequence. 14 B
005986 generated/0687 Generated true Seeded random text, mutation: none. 13 B
005987 generated/0688 Generated true Seeded random text, mutation: none. 299 B
005988 generated/0689 Generated true Seeded random text, mutation: flip bit. 27 B
005989 generated/0690 Generated true Seeded random text, mutation: none. 5 B
005990 generated/0691 Generated true Seeded random text, mutation: truncate. 2 B
005991 generated/0692 Generated false Seeded random text, mutation: delete byte. 77 B
005992 generated/0693 Generated true Seeded random text, mutation: none. 43 B
005993 generated/0694 Generated false Seeded random text, mutation: insert byte. 8 B
005994 generated/0695 Generated true Seeded random text, mutation: none. 295 B
005995 generated/0696 Generated true Seeded random text, mutation: none. 16 B
005996 generated/0697 Generated false Seeded random text, mutation: splice bad sequence. 232 B
005997 generated/0698 Generated true Seeded random text, mutation: none. 2 B
005998 generated/0699 Generated true Seeded random text, mutation: truncate. 89 B
005999 generated/0700 Generated true Seeded random text, mutation: truncate. 2 B
006000 generated/0701 Generated false Seeded random text, mutation: truncate. 65 B
006001 generated/0702 Generated false Seeded random text, mutation: truncate. 5 B
006002 generated/0703 Generated true Seeded random text, mutation: flip bit. 17 B
006003 generated/0704 Generated true Seeded random text, mutation: none. 6 B
006004 generated/0705 Generated false Seeded random text, mutation: replace byte. 267 B
006005 generated/0706 Generated true Seeded random text, mutation: none. 135 B
006006 generated/0707 Generated true Seeded random text, mutation: none. 335 B
006007 generated/0708 Generated false Seeded random text, mutation: delete byte. 6 B
006008 generated/0709 Generated false Seeded random text, mutation: delete byte. 42 B
006009 generated/0710 Generated true Seeded random text, mutation: none. 16 B
006010 generated/0711 Generated false Seeded random text, mutation: replace byte. 42 B
006011 generated/0712 Generated false Seeded random text, mutation: splice bad sequence. 67 B
006012 generated/0713 Generated false Seeded random text, mutation: splice bad sequence. 308 B
006013 generated/0714 Generated false Seeded random text, mutation: flip bit. 27 B
006014 generated/0715 Generated true Seeded random text, mutation: none. 57 B
006015 generated/0716 Generated false Seeded random text, mutation: splice bad sequence. 42 B
006016 generated/0717 Generated false Seeded random text, mutation: replace byte. 78 B
006017 generated/0718 Generated true Seeded random text, mutation: flip bit. 25 B
006018 generated/0719 Generated false Seeded random text, mutation: splice bad sequence. 19 B
006019 generated/0721 Generated false Seeded random text, mutation: splice bad sequence. 269 B
006020 generated/0722 Generated false Seeded random text, mutation: delete byte. 63 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.