[[2D]]
Array Visualizer
Type or paste a grid of values — like [[1, 0], [0, 1]] — or start from a preset. Then color the cells.
Input
JSONBase styling
Element colors(13 unique)
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