Build a regular CSS Grid
Set the row and column counts and adjust each gap. The preview updates along with CSS for the grid container and HTML for its items. Presets provide starting points for a gallery, dashboard, or header-and-footer layout.
Example: a three-column card grid
Choose 3 columns, 2 rows, and 16px for both gaps. The output contains 6 grid items, grid-template-columns: repeat(3, 1fr), grid-template-rows: repeat(2, 1fr), and 16px row and column gaps.
Adapt the copied code to your page
The controls generate equal-width tracks; they do not support dragging items to merge cells or editing arbitrary named areas. Add your own content, breakpoints and item sizing after copying the code. A three-column grid stays three columns until you add a responsive rule.
Where it breaks down
updateGrid() turns the column count, row count and both gap values into grid-template-columns, grid-template-rows and gap, then renders the result with real CSS so the preview is the browser's own layout engine rather than a drawing. Every control change rebuilds the rules and re-renders. copyText() puts both the container declaration and the child rule on the clipboard in one action, because a grid that only half-copies is worse than none.
Formats, sizes and other limits
Regular grids only. Named areas, auto-fill combined with minmax(), subgrid and container queries are not generated, and no media queries are produced — the preview is a single fixed container width, so narrow screens need breakpoints you add yourself. Cell content, alignment and spanning are outside the scope of the generator.
Privacy: no data leaves this tab
The CSS is assembled as a string in this tab and copied to your clipboard; no layout data is uploaded and no style is applied to any remote page.
Frequently asked questions
Can it produce named grid areas?
No. Those are hand-written declarations; the generator covers evenly divided tracks, which is the common case.
Is the output responsive?
Not by itself. Add your own media queries or use clamp() values in the gap and track sizes.
Does the copy button include both rules?
Yes — container and child. Pasting only one of them is the usual reason a copied grid appears to do nothing.