CSS Grid Generator
Build CSS grid layouts visually with custom columns, rows, gaps, and alignment — then copy the ready-to-use CSS.
Columns 3
Col 1
Col 2
Col 3
Quick fill:
Rows 2
Row 1
Row 2
Quick fill:
Gap & Alignment
Column Gap16px
Row Gap16px
Justify Items
Align Items
Layout Presets
Live Preview
3 × 21
2
3
4
5
6
CSS
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 200px 200px;
gap: 16px;
}Tailwind Classes
grid grid-cols-3 gap-4
Unit Reference
1fr1 fraction of available space2fr2× the fraction unitautoSized to contentmin-contentSmallest possible sizemax-contentLargest possible size200pxFixed pixel size50%Percentage of containerminmax(100px, 1fr)Min 100px, max 1fr