CSS Grid Generator

Build CSS Grid layouts visually and copy the code.

Columns3
Rows3
Column Gap8px
Row Gap8px
Column Widths
C1
C2
C3
Preview
1
2
3
4
5
6
7
8
9
CSS Code
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: repeat(3, 1fr);
column-gap: 8px;
row-gap: 8px;

How to Use

Set the number of columns and rows using the sliders. Adjust column and row gap for spacing. Define the width of each column using fr (fractional), px (fixed), or auto units. The visual grid preview updates instantly with numbered cells. Copy the CSS code to use in your project.

FAQ

Related Tools