Get to know MDN better
The i64 value type holds a 64-bit integer.
i64 values are 64 bits wide and are not inherently signed or unsigned. Each instruction chooses its interpretation: signed variants such as i64.div_s treat operands as two's-complement, whereas unsigned variants such as i64.div_u do not. Operations whose result is unaffected by signedness, such as addition, subtraction, multiplication, and bitwise operations, have a single instruction.
i64 is transparent: its bit pattern is observable, and i64 values may be stored in linear memory.
JavaScript's Number type cannot losslessly represent the full i64 range, so i64 values cross the JavaScript boundary as BigInt. Out-of-range BigInts wrap modulo 2⁶⁴. Passing a plain Number where an i64 is expected throws a TypeError.
| Unknown specification # syntax-numtype |
This page was last modified on May 22, 2026 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.