CSS Grid Generator

Design CSS grid layouts visually. Define columns, rows, gaps and areas, then copy the full CSS grid code instantly. Free, runs entirely in your browser.

💻 Developer Tools Free Browser-based
Tool
Columns
Rows
Column gap
Row gap
justify-items

CSS Grid Track Values

ValueMeaning
1frOne fraction of available space
autoSize based on content
200pxFixed pixel size
minmax(100px, 1fr)At least 100px, up to 1fr
repeat(3, 1fr)Three equal columns
fit-content(200px)Fits content up to 200px max

Grid vs Flexbox

CSS Grid is a two-dimensional system — perfect for full-page layouts, dashboards, card grids and any design that needs control over both rows and columns at the same time. Use Flexbox for single-row or single-column component layouts (navigation bars, button groups). Many layouts combine both: Grid for the macro layout, Flexbox for individual components within grid cells.

Frequently Asked Questions