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

All 7,246 cases · 2,791 true · 4,455 false

Case Name Expected Note Size
007050 generated/1794 Generated false Seeded random text, mutation: splice bad sequence. 270 B
007051 generated/1795 Generated false Seeded random text, mutation: insert byte. 326 B
007052 generated/1796 Generated true Seeded random text, mutation: none. 12 B
007053 generated/1797 Generated true Seeded random text, mutation: none. 67 B
007054 generated/1798 Generated false Seeded random text, mutation: insert byte. 19 B
007055 generated/1799 Generated true Seeded random text, mutation: none. 365 B
007056 generated/1800 Generated true Seeded random text, mutation: none. 74 B
007057 generated/1801 Generated false Seeded random text, mutation: splice bad sequence. 9 B
007058 generated/1802 Generated false Seeded random text, mutation: replace byte. 290 B
007059 generated/1803 Generated false Seeded random text, mutation: insert byte. 78 B
007060 generated/1804 Generated false Seeded random text, mutation: replace byte. 16 B
007061 generated/1805 Generated true Seeded random text, mutation: none. 265 B
007062 generated/1806 Generated true Seeded random text, mutation: none. 264 B
007063 generated/1807 Generated false Seeded random text, mutation: replace byte. 7 B
007064 generated/1808 Generated false Seeded random text, mutation: delete byte. 113 B
007065 generated/1809 Generated true Seeded random text, mutation: none. 66 B
007066 generated/1810 Generated false Seeded random text, mutation: truncate. 2 B
007067 generated/1811 Generated true Seeded random text, mutation: none. 59 B
007068 generated/1812 Generated true Seeded random text, mutation: truncate. 62 B
007069 generated/1813 Generated true Seeded random text, mutation: none. 245 B
007070 generated/1814 Generated true Seeded random text, mutation: none. 6 B
007071 generated/1815 Generated true Seeded random text, mutation: none. 8 B
007072 generated/1816 Generated false Seeded random text, mutation: delete byte. 359 B
007073 generated/1817 Generated false Seeded random text, mutation: delete byte. 66 B
007074 generated/1818 Generated false Seeded random text, mutation: splice bad sequence. 16 B
007075 generated/1819 Generated false Seeded random text, mutation: insert byte. 14 B
007076 generated/1820 Generated true Seeded random text, mutation: none. 6 B
007077 generated/1821 Generated false Seeded random text, mutation: delete byte. 61 B
007078 generated/1822 Generated true Seeded random text, mutation: none. 223 B
007079 generated/1823 Generated true Seeded random text, mutation: none. 225 B
007080 generated/1824 Generated false Seeded random text, mutation: delete byte. 63 B
007081 generated/1825 Generated true Seeded random text, mutation: flip bit. 5 B
007082 generated/1826 Generated false Seeded random text, mutation: flip bit. 4 B
007083 generated/1827 Generated true Seeded random text, mutation: none. 156 B
007084 generated/1828 Generated false Seeded random text, mutation: splice bad sequence. 66 B
007085 generated/1829 Generated false Seeded random text, mutation: replace byte. 198 B
007086 generated/1830 Generated false Seeded random text, mutation: replace byte. 49 B
007087 generated/1831 Generated true Seeded random text, mutation: none. 387 B
007088 generated/1832 Generated false Seeded random text, mutation: insert byte. 96 B
007089 generated/1833 Generated false Seeded random text, mutation: replace byte. 24 B
007090 generated/1834 Generated false Seeded random text, mutation: splice bad sequence. 43 B
007091 generated/1835 Generated false Seeded random text, mutation: splice bad sequence. 40 B
007092 generated/1836 Generated false Seeded random text, mutation: splice bad sequence. 174 B
007093 generated/1837 Generated true Seeded random text, mutation: none. 12 B
007094 generated/1838 Generated true Seeded random text, mutation: none. 60 B
007095 generated/1839 Generated false Seeded random text, mutation: insert byte. 8 B
007096 generated/1840 Generated false Seeded random text, mutation: delete byte. 44 B
007097 generated/1841 Generated true Seeded random text, mutation: none. 283 B
007098 generated/1842 Generated true Seeded random text, mutation: none. 5 B
007099 generated/1843 Generated true Seeded random text, mutation: truncate. 94 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.