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
007150 generated/1897 Generated true Seeded random text, mutation: flip bit. 47 B
007151 generated/1898 Generated true Seeded random text, mutation: none. 355 B
007152 generated/1899 Generated true Seeded random text, mutation: replace byte. 64 B
007153 generated/1900 Generated true Seeded random text, mutation: none. 11 B
007154 generated/1901 Generated false Seeded random text, mutation: splice bad sequence. 19 B
007155 generated/1902 Generated true Seeded random text, mutation: flip bit. 248 B
007156 generated/1903 Generated true Seeded random text, mutation: none. 22 B
007157 generated/1905 Generated true Seeded random text, mutation: flip bit. 94 B
007158 generated/1906 Generated false Seeded random text, mutation: insert byte. 79 B
007159 generated/1907 Generated false Seeded random text, mutation: replace byte. 202 B
007160 generated/1908 Generated true Seeded random text, mutation: none. 273 B
007161 generated/1909 Generated true Seeded random text, mutation: none. 241 B
007162 generated/1910 Generated true Seeded random text, mutation: flip bit. 14 B
007163 generated/1912 Generated true Seeded random text, mutation: none. 66 B
007164 generated/1913 Generated false Seeded random text, mutation: insert byte. 284 B
007165 generated/1914 Generated true Seeded random text, mutation: none. 49 B
007166 generated/1915 Generated true Seeded random text, mutation: none. 71 B
007167 generated/1916 Generated true Seeded random text, mutation: none. 235 B
007168 generated/1917 Generated false Seeded random text, mutation: replace byte. 28 B
007169 generated/1918 Generated false Seeded random text, mutation: insert byte. 15 B
007170 generated/1919 Generated false Seeded random text, mutation: splice bad sequence. 354 B
007171 generated/1920 Generated false Seeded random text, mutation: delete byte. 58 B
007172 generated/1921 Generated false Seeded random text, mutation: delete byte. 17 B
007173 generated/1922 Generated false Seeded random text, mutation: delete byte. 8 B
007174 generated/1923 Generated true Seeded random text, mutation: none. 57 B
007175 generated/1924 Generated true Seeded random text, mutation: none. 44 B
007176 generated/1925 Generated false Seeded random text, mutation: insert byte. 9 B
007177 generated/1926 Generated true Seeded random text, mutation: none. 57 B
007178 generated/1927 Generated true Seeded random text, mutation: none. 13 B
007179 generated/1928 Generated false Seeded random text, mutation: delete byte. 239 B
007180 generated/1929 Generated false Seeded random text, mutation: splice bad sequence. 45 B
007181 generated/1930 Generated true Seeded random text, mutation: none. 343 B
007182 generated/1931 Generated true Seeded random text, mutation: none. 67 B
007183 generated/1932 Generated true Seeded random text, mutation: none. 17 B
007184 generated/1933 Generated true Seeded random text, mutation: none. 358 B
007185 generated/1935 Generated true Seeded random text, mutation: replace byte. 244 B
007186 generated/1936 Generated true Seeded random text, mutation: none. 14 B
007187 generated/1937 Generated false Seeded random text, mutation: replace byte. 36 B
007188 generated/1938 Generated true Seeded random text, mutation: none. 27 B
007189 generated/1939 Generated false Seeded random text, mutation: delete byte. 178 B
007190 generated/1940 Generated true Seeded random text, mutation: none. 218 B
007191 generated/1942 Generated false Seeded random text, mutation: insert byte. 18 B
007192 generated/1943 Generated true Seeded random text, mutation: none. 12 B
007193 generated/1944 Generated false Seeded random text, mutation: flip bit. 237 B
007194 generated/1945 Generated true Seeded random text, mutation: truncate. 5 B
007195 generated/1946 Generated true Seeded random text, mutation: none. 81 B
007196 generated/1947 Generated true Seeded random text, mutation: truncate. 3 B
007197 generated/1948 Generated false Seeded random text, mutation: splice bad sequence. 80 B
007198 generated/1950 Generated false Seeded random text, mutation: replace byte. 20 B
007199 generated/1951 Generated false Seeded random text, mutation: insert byte. 7 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.