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
006721 generated/1452 Generated true Seeded random text, mutation: none. 39 B
006722 generated/1453 Generated false Seeded random text, mutation: replace byte. 27 B
006723 generated/1454 Generated true Seeded random text, mutation: none. 166 B
006724 generated/1455 Generated true Seeded random text, mutation: none. 83 B
006725 generated/1456 Generated true Seeded random text, mutation: none. 345 B
006726 generated/1457 Generated false Seeded random text, mutation: replace byte. 378 B
006727 generated/1458 Generated true Seeded random text, mutation: none. 30 B
006728 generated/1459 Generated true Seeded random text, mutation: none. 80 B
006729 generated/1460 Generated true Seeded random text, mutation: replace byte. 132 B
006730 generated/1461 Generated false Seeded random text, mutation: replace byte. 385 B
006731 generated/1462 Generated true Seeded random text, mutation: none. 14 B
006732 generated/1463 Generated false Seeded random text, mutation: splice bad sequence. 32 B
006733 generated/1464 Generated true Seeded random text, mutation: none. 28 B
006734 generated/1465 Generated false Seeded random text, mutation: delete byte. 5 B
006735 generated/1466 Generated true Seeded random text, mutation: flip bit. 28 B
006736 generated/1467 Generated false Seeded random text, mutation: insert byte. 17 B
006737 generated/1468 Generated true Seeded random text, mutation: none. 8 B
006738 generated/1469 Generated false Seeded random text, mutation: splice bad sequence. 15 B
006739 generated/1470 Generated false Seeded random text, mutation: insert byte. 6 B
006740 generated/1471 Generated true Seeded random text, mutation: flip bit. 52 B
006741 generated/1472 Generated true Seeded random text, mutation: none. 14 B
006742 generated/1473 Generated false Seeded random text, mutation: truncate. 69 B
006743 generated/1474 Generated true Seeded random text, mutation: none. 15 B
006744 generated/1475 Generated true Seeded random text, mutation: none. 9 B
006745 generated/1476 Generated true Seeded random text, mutation: none. 370 B
006746 generated/1478 Generated true Seeded random text, mutation: none. 4 B
006747 generated/1479 Generated true Seeded random text, mutation: flip bit. 52 B
006748 generated/1480 Generated true Seeded random text, mutation: none. 43 B
006749 generated/1481 Generated false Seeded random text, mutation: delete byte. 400 B
006750 generated/1482 Generated false Seeded random text, mutation: flip bit. 179 B
006751 generated/1483 Generated false Seeded random text, mutation: truncate. 10 B
006752 generated/1484 Generated false Seeded random text, mutation: splice bad sequence. 62 B
006753 generated/1485 Generated false Seeded random text, mutation: splice bad sequence. 397 B
006754 generated/1486 Generated false Seeded random text, mutation: delete byte. 7 B
006755 generated/1487 Generated true Seeded random text, mutation: truncate. 6 B
006756 generated/1488 Generated true Seeded random text, mutation: none. 307 B
006757 generated/1489 Generated true Seeded random text, mutation: flip bit. 131 B
006758 generated/1490 Generated true Seeded random text, mutation: flip bit. 170 B
006759 generated/1491 Generated true Seeded random text, mutation: none. 13 B
006760 generated/1492 Generated false Seeded random text, mutation: replace byte. 39 B
006761 generated/1493 Generated true Seeded random text, mutation: none. 6 B
006762 generated/1494 Generated true Seeded random text, mutation: replace byte. 159 B
006763 generated/1495 Generated false Seeded random text, mutation: splice bad sequence. 398 B
006764 generated/1496 Generated false Seeded random text, mutation: splice bad sequence. 8 B
006765 generated/1497 Generated true Seeded random text, mutation: flip bit. 13 B
006766 generated/1498 Generated false Seeded random text, mutation: insert byte. 11 B
006767 generated/1499 Generated true Seeded random text, mutation: none. 14 B
006768 generated/1500 Generated false Seeded random text, mutation: insert byte. 4 B
006769 generated/1501 Generated false Seeded random text, mutation: replace byte. 6 B
006770 generated/1502 Generated false Seeded random text, mutation: delete byte. 3 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.