Typed Array Converter & Buffer Inspector
Analyze binary data with this zero-copy Typed Array Inspector. Convert between Hex, Base64, Uint8Array, Float32, and Node Buffers instantly.
Memory Map (Hex View)
Typed Array Views
Developer Snippets
const buffer = new Uint8Array([/* data */]).buffer; const view = new DataView(buffer);
const buf = Buffer.from([/* data */]); // Node buffers are Uint8Arrays in modern Node
About
Binary data handling is the bedrock of high-performance web applications, particularly when dealing with WebGL, WebAssembly (WASM), or WebSocket streams. In JavaScript, the ArrayBuffer represents a generic, fixed-length raw binary data buffer. However, you cannot manipulate the contents of an ArrayBuffer directly; you must create a "View".
This tool acts as a multi-lens microscope for your binary data. It allows you to input raw bytes (via Hex, Base64, or JSON) and simultaneously inspect how different Typed Arrays interpret that same memory block. This is critical for debugging endianness issues - where the order of bytes differs between processor architectures (e.g., Little Endian vs Big Endian). A single misaligned byte in a Float32Array can turn 1.0 into 2.3e-41.
Unlike simple converters that create copies, this inspector simulates the behavior of native Views. It highlights how Uint8Array, Int16Array, and Float32Array read from the exact same memory address P, applying different bit-masks and interpretations.
Formulas
When a Typed Array reads a value from a buffer, it calculates the memory offset based on the element index i and the bytes-per-element constant B.
For multi-byte integers (e.g., 16-bit or 32-bit), the system must decide the order of bytes. In Little Endian (standard for Intel/AMD/Apple Silicon), the least significant byte comes first. In Big Endian (network order), the most significant byte is first.
Reference Data
| Typed Array | Bytes per Element | Value Range | Web IDL Type |
|---|---|---|---|
| Int8Array | 1 | -128 to 127 | byte |
| Uint8Array | 1 | 0 to 255 | octet |
| Uint8ClampedArray | 1 | 0 to 255 | octet |
| Int16Array | 2 | -32,768 to 32,767 | short |
| Uint16Array | 2 | 0 to 65,535 | unsigned short |
| Int32Array | 4 | -2e9 to 2e9 | long |
| Float32Array | 4 | 1.2e-38 to 3.4e38 | unrestricted float |
| Float64Array | 8 | 5.0e-324 to 1.8e308 | unrestricted double |
| BigInt64Array | 8 | -263 to 263-1 | bigint |