Watch a convolution kernel slide across a pixel grid step by step, computing the output feature map live.
INPUT (8×8)
KERNEL (3×3)
OUTPUT FEATURE MAP (6×6)
Position: (0,0)
A convolution slides a small matrix, the kernel (or filter), across an input grid, at each position, it multiplies each kernel value by the corresponding input pixel underneath it, sums all those products together, and writes that single sum as one output pixel. Click "Step Kernel" repeatedly and watch the orange-highlighted 3×3 region slide across the input grid, one output pixel gets computed and filled in at each step, this same simple multiply-and-sum operation, repeated across every position, is the entire mechanism behind convolutional neural networks.
Switch between the kernel presets and regenerate the input grid to see how dramatically the output changes. The edge detection kernel produces high output values only where pixel intensity changes sharply (an edge in the image), flat, uniform regions produce near-zero output. The blur kernel averages nearby pixels together, smoothing out detail and noise. The vertical and horizontal line detector kernels respond strongly to lines in their specific orientation and weakly to lines in other orientations. This demonstrates a core CNN concept, each kernel is a specialized feature detector, and a real convolutional layer applies many different kernels simultaneously, each learning to detect a different pattern.
The kernels in this demo are hand-crafted, well-known image processing filters chosen to make their effect visually clear. In an actual trained CNN, kernel values start random and get adjusted through backpropagation and gradient descent during training, exactly the same optimization process covered in our other visualizers, so the network discovers whichever kernels turn out to be most useful for the specific task it's being trained on, edge detectors and simple pattern detectors often do emerge naturally in early layers, but deeper layers learn increasingly abstract, task-specific feature detectors that aren't hand-interpretable the way these classic filters are.
A single convolutional layer only detects simple, local patterns, an edge, a corner, a simple texture. Stacking multiple convolutional layers lets the network build increasingly complex representations, early layers detect edges, middle layers combine edges into shapes and textures, and deep layers combine those into recognizable object parts or entire objects. This hierarchical feature-building is precisely why CNNs became so effective for image recognition, each layer builds on the features detected by the layer before it, progressively constructing more abstract, meaningful representations of the input image.
Notice the output feature map (6×6) is smaller than the input (8×8), a 3×3 kernel can only fit in positions where it doesn't run off the edge of the grid, losing 2 pixels in each dimension (one from each side). Real CNN architectures often use "padding," adding a border of zeros around the input before convolving, specifically to preserve the spatial dimensions between layers when that's desired, a small but important practical detail in designing real convolutional architectures.