About this tool
CSS Grid Generator is a free, in-browser tool that turns three simple controls — column count, row count, and gap — into a ready-to-paste CSS grid layout. Set the values, watch a live preview redraw, and copy the generated rule.
Columns and rows are whole numbers from 1 to 12 (defaulting to 3 and 2), and the gap is a slider from 0 to 40 pixels (default 10). Both dimensions are written with repeat() and the 1fr unit, so every track shares the available space equally. The preview fills each cell with a numbered, colored block so you can see the track structure at a glance, and the output is a plain .grid rule using display: grid, grid-template-columns, grid-template-rows, and gap. One click copies it to your clipboard.
Everything runs entirely in your browser — no uploads, no accounts, no tracking — and it keeps working offline once the page has loaded.