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
006471 generated/1191 Generated false Seeded random text, mutation: replace byte. 4 B
006472 generated/1192 Generated false Seeded random text, mutation: replace byte. 4 B
006473 generated/1193 Generated false Seeded random text, mutation: splice bad sequence. 75 B
006474 generated/1194 Generated true Seeded random text, mutation: none. 59 B
006475 generated/1195 Generated false Seeded random text, mutation: truncate. 53 B
006476 generated/1196 Generated true Seeded random text, mutation: flip bit. 78 B
006477 generated/1197 Generated true Seeded random text, mutation: none. 44 B
006478 generated/1198 Generated false Seeded random text, mutation: insert byte. 399 B
006479 generated/1199 Generated true Seeded random text, mutation: delete byte. 19 B
006480 generated/1200 Generated true Seeded random text, mutation: none. 187 B
006481 generated/1201 Generated false Seeded random text, mutation: replace byte. 275 B
006482 generated/1202 Generated true Seeded random text, mutation: none. 128 B
006483 generated/1203 Generated false Seeded random text, mutation: replace byte. 44 B
006484 generated/1204 Generated true Seeded random text, mutation: none. 2 B
006485 generated/1205 Generated true Seeded random text, mutation: none. 11 B
006486 generated/1206 Generated true Seeded random text, mutation: none. 13 B
006487 generated/1207 Generated false Seeded random text, mutation: insert byte. 7 B
006488 generated/1208 Generated false Seeded random text, mutation: insert byte. 253 B
006489 generated/1209 Generated true Seeded random text, mutation: none. 361 B
006490 generated/1210 Generated true Seeded random text, mutation: none. 15 B
006491 generated/1211 Generated true Seeded random text, mutation: none. 303 B
006492 generated/1212 Generated true Seeded random text, mutation: none. 109 B
006493 generated/1213 Generated true Seeded random text, mutation: none. 20 B
006494 generated/1214 Generated true Seeded random text, mutation: none. 37 B
006495 generated/1215 Generated false Seeded random text, mutation: delete byte. 285 B
006496 generated/1216 Generated true Seeded random text, mutation: none. 279 B
006497 generated/1217 Generated false Seeded random text, mutation: splice bad sequence. 332 B
006498 generated/1218 Generated true Seeded random text, mutation: truncate. 15 B
006499 generated/1219 Generated true Seeded random text, mutation: truncate. 119 B
006500 generated/1220 Generated false Seeded random text, mutation: replace byte. 8 B
006501 generated/1221 Generated true Seeded random text, mutation: none. 64 B
006502 generated/1222 Generated true Seeded random text, mutation: none. 62 B
006503 generated/1223 Generated false Seeded random text, mutation: truncate. 108 B
006504 generated/1224 Generated false Seeded random text, mutation: delete byte. 41 B
006505 generated/1225 Generated false Seeded random text, mutation: flip bit. 9 B
006506 generated/1226 Generated false Seeded random text, mutation: delete byte. 10 B
006507 generated/1227 Generated false Seeded random text, mutation: replace byte. 47 B
006508 generated/1229 Generated true Seeded random text, mutation: none. 264 B
006509 generated/1230 Generated true Seeded random text, mutation: none. 64 B
006510 generated/1231 Generated false Seeded random text, mutation: truncate. 177 B
006511 generated/1232 Generated false Seeded random text, mutation: truncate. 31 B
006512 generated/1233 Generated false Seeded random text, mutation: flip bit. 14 B
006513 generated/1234 Generated false Seeded random text, mutation: splice bad sequence. 80 B
006514 generated/1235 Generated true Seeded random text, mutation: none. 13 B
006515 generated/1236 Generated false Seeded random text, mutation: delete byte. 307 B
006516 generated/1237 Generated false Seeded random text, mutation: splice bad sequence. 17 B
006517 generated/1238 Generated false Seeded random text, mutation: replace byte. 139 B
006518 generated/1239 Generated true Seeded random text, mutation: none. 336 B
006519 generated/1240 Generated true Seeded random text, mutation: none. 77 B
006520 generated/1241 Generated true Seeded random text, mutation: none. 8 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.