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
006671 generated/1399 Generated false Seeded random text, mutation: replace byte. 10 B
006672 generated/1400 Generated true Seeded random text, mutation: none. 33 B
006673 generated/1401 Generated true Seeded random text, mutation: none. 12 B
006674 generated/1402 Generated true Seeded random text, mutation: flip bit. 382 B
006675 generated/1403 Generated true Seeded random text, mutation: none. 88 B
006676 generated/1404 Generated true Seeded random text, mutation: none. 8 B
006677 generated/1405 Generated false Seeded random text, mutation: truncate. 52 B
006678 generated/1406 Generated false Seeded random text, mutation: truncate. 2 B
006679 generated/1407 Generated false Seeded random text, mutation: splice bad sequence. 14 B
006680 generated/1408 Generated false Seeded random text, mutation: splice bad sequence. 14 B
006681 generated/1409 Generated true Seeded random text, mutation: truncate. 4 B
006682 generated/1410 Generated false Seeded random text, mutation: delete byte. 360 B
006683 generated/1411 Generated false Seeded random text, mutation: replace byte. 94 B
006684 generated/1412 Generated false Seeded random text, mutation: delete byte. 66 B
006685 generated/1413 Generated false Seeded random text, mutation: splice bad sequence. 3 B
006686 generated/1414 Generated true Seeded random text, mutation: none. 310 B
006687 generated/1416 Generated true Seeded random text, mutation: flip bit. 71 B
006688 generated/1417 Generated false Seeded random text, mutation: replace byte. 15 B
006689 generated/1418 Generated false Seeded random text, mutation: replace byte. 4 B
006690 generated/1419 Generated false Seeded random text, mutation: insert byte. 14 B
006691 generated/1420 Generated true Seeded random text, mutation: none. 11 B
006692 generated/1421 Generated true Seeded random text, mutation: none. 29 B
006693 generated/1422 Generated false Seeded random text, mutation: delete byte. 378 B
006694 generated/1423 Generated true Seeded random text, mutation: none. 381 B
006695 generated/1424 Generated true Seeded random text, mutation: none. 4 B
006696 generated/1425 Generated true Seeded random text, mutation: none. 395 B
006697 generated/1426 Generated false Seeded random text, mutation: truncate. 12 B
006698 generated/1427 Generated true Seeded random text, mutation: none. 6 B
006699 generated/1428 Generated true Seeded random text, mutation: truncate. 63 B
006700 generated/1429 Generated true Seeded random text, mutation: none. 14 B
006701 generated/1430 Generated true Seeded random text, mutation: none. 68 B
006702 generated/1431 Generated true Seeded random text, mutation: none. 12 B
006703 generated/1432 Generated false Seeded random text, mutation: splice bad sequence. 33 B
006704 generated/1433 Generated true Seeded random text, mutation: none. 14 B
006705 generated/1434 Generated true Seeded random text, mutation: none. 31 B
006706 generated/1435 Generated false Seeded random text, mutation: splice bad sequence. 37 B
006707 generated/1436 Generated false Seeded random text, mutation: splice bad sequence. 67 B
006708 generated/1437 Generated false Seeded random text, mutation: delete byte. 75 B
006709 generated/1438 Generated false Seeded random text, mutation: splice bad sequence. 33 B
006710 generated/1439 Generated false Seeded random text, mutation: replace byte. 12 B
006711 generated/1441 Generated false Seeded random text, mutation: insert byte. 4 B
006712 generated/1442 Generated true Seeded random text, mutation: none. 5 B
006713 generated/1443 Generated true Seeded random text, mutation: none. 276 B
006714 generated/1444 Generated false Seeded random text, mutation: delete byte. 5 B
006715 generated/1445 Generated true Seeded random text, mutation: flip bit. 22 B
006716 generated/1447 Generated false Seeded random text, mutation: insert byte. 393 B
006717 generated/1448 Generated true Seeded random text, mutation: none. 10 B
006718 generated/1449 Generated false Seeded random text, mutation: delete byte. 30 B
006719 generated/1450 Generated true Seeded random text, mutation: truncate. 9 B
006720 generated/1451 Generated true Seeded random text, mutation: truncate. 109 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.