[[2D]]

Array Visualizer

Paste any 2D array as JSON, pick colors for each value, and explore how matrices map to a grid.

Input

JSON

Ready to visualize

Paste a 2D array on the left or pick a preset to see it rendered as a grid.

Learn 2D Arrays

A 2D array is an array of arrays: a grid of rows × cols cells accessed by two indices, matrix[row][col].

In memory, most languages store 2D arrays in row-major order: row 0 first, then row 1, and so on. That's why iterating row-by-row is cache-friendly and usually faster than column-by-column.

// shape: 3 × 3
[[1, 0, 0], [0, 1, 0], [0, 0, 1]]
// matrix[1][2] → 0