Build CSS grid layouts visually. Set rows, columns and gaps, preview the grid live and copy the CSS and HTML. Free online CSS grid generator.
About this tool
Build a CSS grid with configurable tracks, gaps and a spanning first item.
How to use CSS Grid Generator
- Set Columns, Rows, Column gap and Row gap.
- Choose Column size and optionally let the first item span two columns.
- Copy the generated CSS and test it with real content.
Worked example
Choose responsive auto-fill tracks for cards that should wrap as the container width changes.
What is minmax(0, 1fr) for?
It lets equal tracks shrink below their content’s automatic minimum. Long content may still need wrapping rules.
Does the preview set my website breakpoints?
No. Apply and test the output in your own container; add responsive rules if the layout needs them.
Explore CSS Tools · More practical guides