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
006021 generated/0723 Generated true Seeded random text, mutation: none. 42 B
006022 generated/0724 Generated true Seeded random text, mutation: none. 397 B
006023 generated/0725 Generated false Seeded random text, mutation: flip bit. 50 B
006024 generated/0726 Generated false Seeded random text, mutation: splice bad sequence. 7 B
006025 generated/0727 Generated true Seeded random text, mutation: flip bit. 186 B
006026 generated/0728 Generated true Seeded random text, mutation: none. 74 B
006027 generated/0729 Generated false Seeded random text, mutation: splice bad sequence. 59 B
006028 generated/0730 Generated false Seeded random text, mutation: insert byte. 399 B
006029 generated/0731 Generated true Seeded random text, mutation: none. 4 B
006030 generated/0732 Generated true Seeded random text, mutation: none. 79 B
006031 generated/0733 Generated false Seeded random text, mutation: splice bad sequence. 53 B
006032 generated/0734 Generated false Seeded random text, mutation: delete byte. 72 B
006033 generated/0735 Generated true Seeded random text, mutation: none. 13 B
006034 generated/0736 Generated true Seeded random text, mutation: replace byte. 120 B
006035 generated/0737 Generated false Seeded random text, mutation: truncate. 2 B
006036 generated/0738 Generated false Seeded random text, mutation: replace byte. 134 B
006037 generated/0739 Generated true Seeded random text, mutation: flip bit. 8 B
006038 generated/0740 Generated false Seeded random text, mutation: truncate. 4 B
006039 generated/0741 Generated true Seeded random text, mutation: none. 7 B
006040 generated/0742 Generated true Seeded random text, mutation: none. 385 B
006041 generated/0743 Generated false Seeded random text, mutation: flip bit. 51 B
006042 generated/0744 Generated false Seeded random text, mutation: flip bit. 7 B
006043 generated/0747 Generated true Seeded random text, mutation: none. 48 B
006044 generated/0748 Generated true Seeded random text, mutation: flip bit. 18 B
006045 generated/0749 Generated true Seeded random text, mutation: none. 346 B
006046 generated/0750 Generated false Seeded random text, mutation: splice bad sequence. 62 B
006047 generated/0751 Generated false Seeded random text, mutation: delete byte. 196 B
006048 generated/0752 Generated true Seeded random text, mutation: none. 312 B
006049 generated/0753 Generated false Seeded random text, mutation: insert byte. 7 B
006050 generated/0754 Generated false Seeded random text, mutation: truncate. 144 B
006051 generated/0755 Generated true Seeded random text, mutation: none. 5 B
006052 generated/0756 Generated true Seeded random text, mutation: truncate. 3 B
006053 generated/0757 Generated false Seeded random text, mutation: insert byte. 157 B
006054 generated/0758 Generated false Seeded random text, mutation: replace byte. 370 B
006055 generated/0759 Generated true Seeded random text, mutation: flip bit. 60 B
006056 generated/0760 Generated true Seeded random text, mutation: none. 40 B
006057 generated/0761 Generated false Seeded random text, mutation: truncate. 179 B
006058 generated/0762 Generated false Seeded random text, mutation: delete byte. 3 B
006059 generated/0763 Generated false Seeded random text, mutation: flip bit. 20 B
006060 generated/0764 Generated true Seeded random text, mutation: none. 72 B
006061 generated/0765 Generated true Seeded random text, mutation: truncate. 32 B
006062 generated/0766 Generated false Seeded random text, mutation: insert byte. 92 B
006063 generated/0767 Generated true Seeded random text, mutation: flip bit. 82 B
006064 generated/0768 Generated true Seeded random text, mutation: none. 15 B
006065 generated/0769 Generated false Seeded random text, mutation: splice bad sequence. 27 B
006066 generated/0770 Generated false Seeded random text, mutation: splice bad sequence. 13 B
006067 generated/0771 Generated true Seeded random text, mutation: flip bit. 64 B
006068 generated/0772 Generated true Seeded random text, mutation: none. 388 B
006069 generated/0773 Generated false Seeded random text, mutation: splice bad sequence. 403 B
006070 generated/0774 Generated true Seeded random text, mutation: none. 6 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.