Types appear in the type, import, table, memory, global and tag sections, in local declarations and in instructions. This page lists every type code of the binary format, WebAssembly 3.0. Where a type index can stand in place of a type code, it is written as a non-negative signed 33-bit LEB128 number (s33).
Value types
| Byte | Type | Since |
|---|---|---|
7F | i32 | 1.0 |
7E | i64 | 1.0 |
7D | f32 | 1.0 |
7C | f64 | 1.0 |
7B | v128 | 2.0 |
78 | i8: packed, only in struct and array fields | 3.0 |
77 | i16: packed, only in fields | 3.0 |
64 ht | (ref ht): non-null reference | 3.0 |
63 ht | (ref null ht): nullable reference | 3.0 |
| heap type byte | shorthand for (ref null ht); 70 is funcref, 6F externref | 2.0 (as value types) |
Heap types
| Byte | Heap type |
|---|---|
74 | noexn (3.0) |
73 | nofunc (3.0) |
72 | noextern (3.0) |
71 | none (3.0) |
70 | func |
6F | extern |
6E | any (3.0) |
6D | eq (3.0) |
6C | i31 (3.0) |
6B | struct (3.0) |
6A | array (3.0) |
69 | exn (3.0) |
| s33 ≥ 0 | a defined type, by type index (3.0) |
Defined types
Each entry of the type section is a recursive type:
| Encoding | Meaning |
|---|---|
4E vec(subtype) | rec: a group of types that may refer to each other (3.0). |
| subtype | A single type, a group of one. |
| Encoding | Subtype |
|---|---|
50 vec(typeidx) comptype | sub: may be extended, with the given supertypes (3.0). |
4F vec(typeidx) comptype | sub final: cannot be extended (3.0). |
| comptype | Final, with no supertypes. |
| Encoding | Composite type |
|---|---|
60 vec(valtype) vec(valtype) | func: parameters, then results. |
5F vec(fieldtype) | struct (3.0). |
5E fieldtype | array (3.0). |
A field type is a storage type (a value type, or 78 i8 /
77 i16) followed by mutability: 00 immutable,
01 mutable. In 1.0 and 2.0 every entry is a bare 60 function
type.
Limits
| Flags | Address type | Then |
|---|---|---|
00 | i32 | min |
01 | i32 | min, max |
04 | i64 (3.0) | min |
05 | i64 (3.0) | min, max |
min and max are unsigned LEB128 numbers; only with i64 limits may they exceed 32
bits. Bit 0 means a maximum is present and bit 2
selects 64-bit addressing (the memory64 proposal, phase 4 and part of release 3.0).
Flags 02, 03, 06 and 07 are not
defined in the core release 3.0; bit 1 is the shared bit of the threads proposal,
below, and bits 3 and above belong to the custom-page-sizes proposal, which is not
covered (phase 3).
Shared memory limits (threads proposal)
The threads proposal gives limits a share field, unshared or
shared, and encodes it in the flags:
| Flags | Then | Meaning |
|---|---|---|
00 | min | unshared, no maximum |
01 | min, max | unshared |
03 | min, max | shared |
With memory64 the same share bit combines with the i64 address bit, giving the full
set below. The memory64 proposal’s binary-format section
(proposals/memory64/Overview.md, raw file read 2026-11-14) lists all
eight:
| Flags | Address type | Then | Share | Valid? |
|---|---|---|---|---|
00 | i32 | min | unshared | yes |
01 | i32 | min, max (u32) | unshared | yes |
02 | i32 | min | shared | no: a shared memory needs a maximum |
03 | i32 | min, max (u32) | shared | yes |
04 | i64 | min (u64) | unshared | yes |
05 | i64 | min, max (u64) | unshared | yes |
06 | i64 | min (u64) | shared | no: a shared memory needs a maximum |
07 | i64 | min, max (u64) | shared | yes (64-bit builds with threads) |
Flags 03 and 07 are the only shared forms. The threads proposal does not allow a shared
memory without a maximum (the combination that would be 02, with bit 1
as the shared bit and bit 0 clear), so that the embedder can reserve the whole address
range and the base address never changes; the proposal lists only the three encodings
above. Only memories can
be shared in this proposal (shared tables belong to the separate Shared-Everything
Threads proposal). A shared memory may be imported or defined, and a module’s memory
import must say whether it accepts shared memory: importing shared memory where
non-shared is declared, or the reverse, is a validation error. Source:
proposals/threads/Overview.md (sections “Shared Linear Memory” and
“Spec Changes”) in
github.com/WebAssembly/threads,
raw file read 2026-11-14. The threads proposal itself defines only the i32 forms
00, 01 and 03; 02,
06 and 07 come from the memory64 file above.
Custom page sizes (not covered). The custom-page-sizes proposal
adds flags 08 to 0F (a u32 after the limits, the page size as a power of two). It is at
phase 3 in the proposals table
(github.com/WebAssembly/proposals, README.md, read
2026-11-14), so this page does not describe it.
Memory, table, global and tag types
| Type | Encoding | Meaning |
|---|---|---|
| memtype | limits | Size in pages. |
| tabletype | reftype, limits | Element type and size in elements. |
| globaltype | valtype, mutability | 00 constant, 01 mutable. |
| tagtype | 00, typeidx | An exception tag whose parameters are those of the function type (3.0). |
External kinds
| Byte | Kind | Followed by (imports) |
|---|---|---|
00 | function | typeidx |
01 | table | tabletype |
02 | memory | memtype |
03 | global | globaltype |
04 | tag (3.0) | tagtype |
Block types
| Encoding | Block type |
|---|---|
40 | no parameters, no results |
| valtype | no parameters, one result |
| s33 ≥ 0 | the function type with that index (parameters and several results, 2.0) |
Example
60 02 7F 7F 01 7F func (i32, i32) -> (i32)
5F 02 7F 01 78 00 struct with a mutable i32 field and an immutable i8 field
63 00 (ref null 0): nullable reference to type 0
01 01 10 limits: i32, min 1, max 16 (a memory of 1 to 16 pages)
Sources
The WebAssembly core specification, release 3.0, binary format chapter “Types” (every code in the tables), and appendix “Change History” for the release in which each feature appeared. The example bytes are built from those encodings.